Class: YARD::Parser::Ruby::MethodCallNode
Constant Summary
Constants inherited from AstNode
Instance Attribute Summary
Attributes inherited from AstNode
docstring, docstring_hash_flag, docstring_range, file, full_source, group, line_range, parent, source, source_range, type
Instance Method Summary (collapse)
- - (Object) block_param
- - (Boolean) call?
- - (Object) method_name(name_only = false)
- - (Object) namespace
- - (Object) parameters(include_block_param = true)
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
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Method Details
- (Object) block_param
369 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 369 def block_param; parameters.last end |
- (Boolean) call?
352 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 352 def call?; true end |
- (Object) method_name(name_only = false)
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 |
- (Object) namespace
353 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 353 def namespace; first if index_adjust > 0 end |
- (Object) parameters(include_block_param = true)
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 |