Class: Hydrangea::SingleNode

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/hydrangea/single_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transform, node) ⇒ SingleNode

Returns a new instance of SingleNode.



11
12
13
# File 'lib/hydrangea/single_node.rb', line 11

def initialize(transform, node)
  @transform, @node = transform, node
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



8
9
10
# File 'lib/hydrangea/single_node.rb', line 8

def node
  @node
end

Instance Method Details

#passObject



21
22
23
# File 'lib/hydrangea/single_node.rb', line 21

def pass
  @transform.pass(node: node)
end