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