Class: ActiveModel::BlockValidator
- Inherits:
-
EachValidator
- Object
- Validator
- EachValidator
- ActiveModel::BlockValidator
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/validator.rb
Overview
BlockValidator
is a special EachValidator
which receives a block on initialization and call this block for each attribute being validated. validates_each
uses this validator.
Instance Attribute Summary
Attributes inherited from EachValidator
Attributes inherited from Validator
Instance Method Summary collapse
-
#initialize(options, &block) ⇒ BlockValidator
constructor
:nodoc:.
Methods inherited from EachValidator
Methods inherited from Validator
Constructor Details
#initialize(options, &block) ⇒ BlockValidator
:nodoc:
178 179 180 181 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/validator.rb', line 178 def initialize(, &block) @block = block super end |