Class: Almanack::SerializedTransformation
- Inherits:
-
Object
- Object
- Almanack::SerializedTransformation
- Defined in:
- lib/almanack/serialized_transformation.rb
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(subject) ⇒ SerializedTransformation
constructor
A new instance of SerializedTransformation.
- #key(&block) ⇒ Object
- #value(&block) ⇒ Object
Constructor Details
#initialize(subject) ⇒ SerializedTransformation
Returns a new instance of SerializedTransformation.
4 5 6 7 |
# File 'lib/almanack/serialized_transformation.rb', line 4 def initialize(subject) @subject = subject @transformations = {} end |
Instance Method Details
#apply ⇒ Object
17 18 19 |
# File 'lib/almanack/serialized_transformation.rb', line 17 def apply recurse(cloned) end |
#key(&block) ⇒ Object
9 10 11 |
# File 'lib/almanack/serialized_transformation.rb', line 9 def key(&block) @transformations[:key] = block end |
#value(&block) ⇒ Object
13 14 15 |
# File 'lib/almanack/serialized_transformation.rb', line 13 def value(&block) @transformations[:value] = block end |