Class: Refract::IndexOperatorWriteNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/index_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, receiver:, arguments:, block:, binary_operator:, value:) ⇒ IndexOperatorWriteNode

Returns a new instance of IndexOperatorWriteNode.



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

def initialize(prism_node: nil, receiver:, arguments:, block:, binary_operator:, value:)
  @prism_node = prism_node => Prism::Node | nil
  @receiver = receiver
  @arguments = arguments
  @block = block
  @binary_operator = binary_operator
  @value = value
  freeze
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



15
16
17
# File 'lib/refract/nodes/index_operator_write_node.rb', line 15

def arguments
  @arguments
end

#binary_operatorObject

Returns the value of attribute binary_operator.



15
16
17
# File 'lib/refract/nodes/index_operator_write_node.rb', line 15

def binary_operator
  @binary_operator
end

#blockObject

Returns the value of attribute block.



15
16
17
# File 'lib/refract/nodes/index_operator_write_node.rb', line 15

def block
  @block
end

#receiverObject

Returns the value of attribute receiver.



15
16
17
# File 'lib/refract/nodes/index_operator_write_node.rb', line 15

def receiver
  @receiver
end

#valueObject

Returns the value of attribute value.



15
16
17
# File 'lib/refract/nodes/index_operator_write_node.rb', line 15

def value
  @value
end