class Riml::CallNode
Node of a method call, can take any of these forms:
Method() s:Method(argument1, argument2)
Constants
- ALL_BUILTIN_COMMANDS
- ALL_BUILTIN_FUNCTIONS
Attributes
super_call[RW]
super_call?[RW]
Public Class Methods
new(scope_modifier, name, arguments)
click to toggle source
Calls superclass method
# File lib/riml/nodes.rb, line 270 def initialize(scope_modifier, name, arguments) super remove_parens_wrapper if builtin_command? end
Public Instance Methods
autoload?()
click to toggle source
# File lib/riml/nodes.rb, line 304 def autoload? name.include?('#') end
builtin_command?()
click to toggle source
# File lib/riml/nodes.rb, line 285 def builtin_command? return false unless name.is_a?(String) scope_modifier.nil? and ALL_BUILTIN_COMMANDS.include?(name) end
builtin_function?()
click to toggle source
# File lib/riml/nodes.rb, line 280 def builtin_function? return false unless name.is_a?(String) scope_modifier.nil? and ALL_BUILTIN_FUNCTIONS.include?(name) end
children()
click to toggle source
# File lib/riml/nodes.rb, line 312 def children if name.is_a?(String) arguments else [name] + arguments end end
force_newline_if_child_call_node?()
click to toggle source
# File lib/riml/nodes.rb, line 308 def force_newline_if_child_call_node? false end
method_call?()
click to toggle source
# File lib/riml/nodes.rb, line 296 def method_call? name.instance_of?(DictGetDotNode) && name.dict.name == 'self' && name.dict.scope_modifier.nil? end
must_be_explicit_call?()
click to toggle source
# File lib/riml/nodes.rb, line 290 def must_be_explicit_call? return false if builtin_command? return true if parent.instance_of?(Nodes) false end
remove_parens_wrapper()
click to toggle source
# File lib/riml/nodes.rb, line 275 def remove_parens_wrapper return unless WrapInParensNode === arguments.first arguments[0] = arguments[0].expression end