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