Class: ActiveModel::BlockValidator
- Inherits:
-
EachValidator
- Object
- Validator
- EachValidator
- ActiveModel::BlockValidator
- Defined in:
- 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:
172 173 174 175 |
# File 'lib/active_model/validator.rb', line 172 def initialize(, &block) @block = block super end |