Class: Reforge::Transformation::Tree::TransformNode
- Inherits:
-
Object
- Object
- Reforge::Transformation::Tree::TransformNode
- Defined in:
- lib/reforge/transformation/tree/transform_node.rb
Instance Attribute Summary collapse
-
#transform ⇒ Object
readonly
Returns the value of attribute transform.
Instance Method Summary collapse
- #call(source) ⇒ Object
-
#initialize(transform) ⇒ TransformNode
constructor
A new instance of TransformNode.
- #update_path(path) ⇒ Object
Constructor Details
#initialize(transform) ⇒ TransformNode
Returns a new instance of TransformNode.
9 10 11 12 13 |
# File 'lib/reforge/transformation/tree/transform_node.rb', line 9 def initialize(transform) validate_transform!(transform) @transform = transform end |
Instance Attribute Details
#transform ⇒ Object (readonly)
Returns the value of attribute transform.
7 8 9 |
# File 'lib/reforge/transformation/tree/transform_node.rb', line 7 def transform @transform end |
Instance Method Details
#call(source) ⇒ Object
15 16 17 |
# File 'lib/reforge/transformation/tree/transform_node.rb', line 15 def call(source) transform.call(source) end |
#update_path(path) ⇒ Object
19 20 21 |
# File 'lib/reforge/transformation/tree/transform_node.rb', line 19 def update_path(path) @path = path end |