class method
self.new
Ruby on Rails 7.2.3
Since v3.0.20Signature
self.new(options = {})
Accepts options that will be made available through the options reader.
Parameters
-
optionsopt = {}
Source
# File activemodel/lib/active_model/validator.rb, line 108
def initialize(options = {})
@options = options.except(:class).freeze
end
Defined in activemodel/lib/active_model/validator.rb line 108
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validator