Class: Refract::IndexTargetNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/index_target_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:) ⇒ IndexTargetNode

Returns a new instance of IndexTargetNode.



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

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

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



13
14
15
# File 'lib/refract/nodes/index_target_node.rb', line 13

def arguments
  @arguments
end

#blockObject

Returns the value of attribute block.



13
14
15
# File 'lib/refract/nodes/index_target_node.rb', line 13

def block
  @block
end

#receiverObject

Returns the value of attribute receiver.



13
14
15
# File 'lib/refract/nodes/index_target_node.rb', line 13

def receiver
  @receiver
end