Class: Fixturama::Changes::Base Abstract
- Inherits:
-
Object
- Object
- Fixturama::Changes::Base
- Defined in:
- lib/fixturama/changes/base.rb
Overview
This class is abstract.
Base class for changes downloaded from a fixture
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#call(_example) ⇒ self
abstract
Call the corresponding change (either a stub or a seed).
-
#merge(other) ⇒ Fixturama::Changes::Base
Merge the other change into the current one.
Instance Attribute Details
#key The key identifier of the change(Thekeyidentifierofthechange) ⇒ String (readonly)
10 |
# File 'lib/fixturama/changes/base.rb', line 10 alias key hash |
Instance Method Details
#call(_example) ⇒ self
This method is abstract.
Call the corresponding change (either a stub or a seed)
24 25 26 |
# File 'lib/fixturama/changes/base.rb', line 24 def call(_example) self end |
#merge(other) ⇒ Fixturama::Changes::Base
Merge the other change into the current one
15 16 17 18 |
# File 'lib/fixturama/changes/base.rb', line 15 def merge(other) # By default just take the other change if applicable other.class == self.class && other.key == key ? other : self end |