Class: ActiveShepherd::ChangesValidator
- Inherits:
-
Object
- Object
- ActiveShepherd::ChangesValidator
- Defined in:
- lib/active_shepherd/changes_validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record) ⇒ ChangesValidator
constructor
A new instance of ChangesValidator.
- #validate(changes) ⇒ Object
Constructor Details
#initialize(record) ⇒ ChangesValidator
Returns a new instance of ChangesValidator.
4 5 6 |
# File 'lib/active_shepherd/changes_validator.rb', line 4 def initialize(record) @record = record end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
2 3 4 |
# File 'lib/active_shepherd/changes_validator.rb', line 2 def errors @errors end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
2 3 4 |
# File 'lib/active_shepherd/changes_validator.rb', line 2 def record @record end |
Instance Method Details
#validate(changes) ⇒ Object
8 9 10 |
# File 'lib/active_shepherd/changes_validator.rb', line 8 def validate(changes) @errors = [] end |