Class: Dinamo::Model::Validation::Validator
- Inherits:
-
Object
- Object
- Dinamo::Model::Validation::Validator
- Defined in:
- lib/dinamo/model/validator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(**options, &block) ⇒ Validator
constructor
A new instance of Validator.
- #validate(record) ⇒ Object
Constructor Details
#initialize(**options, &block) ⇒ Validator
9 10 11 12 |
# File 'lib/dinamo/model/validator.rb', line 9 def initialize(**, &block) @options = || {} @block = block end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/dinamo/model/validator.rb', line 7 def @options end |
Instance Method Details
#validate(record) ⇒ Object
14 15 16 |
# File 'lib/dinamo/model/validator.rb', line 14 def validate(record) raise NotImplementedError end |