Module: Rekiq::Validator::ClassMethods
- Defined in:
- lib/rekiq/validator.rb
Instance Attribute Summary collapse
-
#for_validation ⇒ Object
Returns the value of attribute for_validation.
Instance Method Summary collapse
Instance Attribute Details
#for_validation ⇒ Object
Returns the value of attribute for_validation.
6 7 8 |
# File 'lib/rekiq/validator.rb', line 6 def for_validation @for_validation end |
Instance Method Details
#validate(attribute_name, type, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/rekiq/validator.rb', line 8 def validate(attribute_name, type, = {}) [:allow_nil] = false if [:allow_nil].nil? self.for_validation << { attribute_name: attribute_name, type: type, options: } end |