Class: YARD::Parser::Ruby::MethodCallNode
Constant Summary
Constants inherited from AstNode
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, #token?, #traverse
Methods inherited from Array
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Method Details
- (Object) block_param
354 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 354 def block_param; parameters.last end |
- (Boolean) call?
339 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 339 def call?; true end |
- (Object) method_name(name_only = false)
342 343 344 345 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 342 def method_name(name_only = false) name = self[index_adjust] name_only ? name.jump(:ident).first.to_sym : name end |
- (Object) namespace
340 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 340 def namespace; first if index_adjust > 0 end |
- (Object) parameters(include_block_param = true)
347 348 349 350 351 352 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 347 def parameters(include_block_param = true) params = self[1 + index_adjust] return nil unless params params = call_has_paren? ? params.first : params include_block_param ? params : params[0...-1] end |