Class: Refract::LocalVariableOperatorWriteNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/local_variable_operator_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, name:, value:, binary_operator:, depth:) ⇒ LocalVariableOperatorWriteNode

Returns a new instance of LocalVariableOperatorWriteNode.



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

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

Instance Attribute Details

#binary_operatorObject

Returns the value of attribute binary_operator.



14
15
16
# File 'lib/refract/nodes/local_variable_operator_write_node.rb', line 14

def binary_operator
  @binary_operator
end

#depthObject

Returns the value of attribute depth.



14
15
16
# File 'lib/refract/nodes/local_variable_operator_write_node.rb', line 14

def depth
  @depth
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/refract/nodes/local_variable_operator_write_node.rb', line 14

def name
  @name
end

#valueObject

Returns the value of attribute value.



14
15
16
# File 'lib/refract/nodes/local_variable_operator_write_node.rb', line 14

def value
  @value
end