Class: Refract::PinnedVariableNode
- Defined in:
- lib/refract/nodes/pinned_variable_node.rb
Instance Attribute Summary collapse
-
#variable ⇒ Object
Returns the value of attribute variable.
Instance Method Summary collapse
-
#initialize(prism_node: nil, variable:) ⇒ PinnedVariableNode
constructor
A new instance of PinnedVariableNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, variable:) ⇒ PinnedVariableNode
Returns a new instance of PinnedVariableNode.
5 6 7 8 9 |
# File 'lib/refract/nodes/pinned_variable_node.rb', line 5 def initialize(prism_node: nil, variable:) @prism_node = prism_node => Prism::Node | nil @variable = variable freeze end |
Instance Attribute Details
#variable ⇒ Object
Returns the value of attribute variable.
11 12 13 |
# File 'lib/refract/nodes/pinned_variable_node.rb', line 11 def variable @variable end |