Class: ActiveShepherd::ChangesValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/active_shepherd/changes_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errorsObject (readonly)

Returns the value of attribute errors.



2
3
4
# File 'lib/active_shepherd/changes_validator.rb', line 2

def errors
  @errors
end

#recordObject (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