Class: Refract::CallNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/call_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: nil, name:, arguments: nil, block: nil, safe_navigation: nil) ⇒ CallNode

Returns a new instance of CallNode.



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

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

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



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

def arguments
  @arguments
end

#blockObject

Returns the value of attribute block.



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

def block
  @block
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#receiverObject

Returns the value of attribute receiver.



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

def receiver
  @receiver
end

#safe_navigationObject

Returns the value of attribute safe_navigation.



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

def safe_navigation
  @safe_navigation
end