Class: Reforge::Transformation::Tree::TransformNode

Inherits:
Object
  • Object
show all
Defined in:
lib/reforge/transformation/tree/transform_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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