Class: Refract::ConstantPathAndWriteNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/constant_path_and_write_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept, #copy, #start_line, #type, type

Constructor Details

#initialize(prism_node: nil, target:, value:) ⇒ ConstantPathAndWriteNode

Returns a new instance of ConstantPathAndWriteNode.



5
6
7
8
9
10
# File 'lib/refract/nodes/constant_path_and_write_node.rb', line 5

def initialize(prism_node: nil, target:, value:)
	@prism_node = prism_node => Prism::Node | nil
	@target = target
	@value = value
	freeze
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



12
13
14
# File 'lib/refract/nodes/constant_path_and_write_node.rb', line 12

def target
  @target
end

#valueObject

Returns the value of attribute value.



12
13
14
# File 'lib/refract/nodes/constant_path_and_write_node.rb', line 12

def value
  @value
end