Class: Mixture::Validate::Base
- Inherits:
-
Object
- Object
- Mixture::Validate::Base
- Defined in:
- lib/mixture/validate/base.rb
Instance Method Summary collapse
- #error(message) ⇒ Object
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
- #validate(record, attribute, value) ⇒ Object
Constructor Details
#initialize(options) ⇒ Base
6 7 8 |
# File 'lib/mixture/validate/base.rb', line 6 def initialize() = end |
Instance Method Details
#error(message) ⇒ Object
16 17 18 |
# File 'lib/mixture/validate/base.rb', line 16 def error() fail ValidationError, end |
#validate(record, attribute, value) ⇒ Object
10 11 12 13 14 |
# File 'lib/mixture/validate/base.rb', line 10 def validate(record, attribute, value) @record = record @attribute = attribute @value = value end |