Class: YARD::Parser::Ruby::MethodCallNode
Constant Summary
Constants inherited
from AstNode
AstNode::KEYWORDS
Instance Attribute Summary
Attributes inherited from AstNode
#docstring, #docstring_hash_flag, #docstring_range, #file, #full_source, #group, #line_range, #parent, #source, #source_range, #type
Methods inherited from AstNode
#children, #condition?, #first_line, #has_line?, #initialize, #inspect, #jump, #kw?, #line, #literal?, node_class_for, #pretty_print, #ref?, #show, #to_s, #token?, #traverse
Methods inherited from Array
#place
Instance Method Details
#block_param ⇒ Object
369
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 369
def block_param; parameters.last end
|
#call? ⇒ Boolean
352
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 352
def call?; true end
|
#method_name(name_only = false) ⇒ Object
355
356
357
358
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 355
def method_name(name_only = false)
name = self[index_adjust]
name_only ? name.jump(:ident).first.to_sym : name
end
|
#namespace ⇒ Object
353
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 353
def namespace; first if index_adjust > 0 end
|
#parameters(include_block_param = true) ⇒ Object
360
361
362
363
364
365
366
367
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 360
def parameters(include_block_param = true)
return [] if type == :vcall
params = self[1 + index_adjust]
return [] unless params
params = call_has_paren? ? params.first : params
return [] unless params
include_block_param ? params : params[0...-1]
end
|