Class: YARD::Parser::Ruby::MethodCallNode
Constant Summary
Constants inherited from AstNode
Instance Method Summary
- - (Object) block_param
- - (Boolean) call?
- - (Object) method_name(name_only = false)
- - (Object) namespace
- - (Object) parameters(include_block_param = true)
Methods inherited from AstNode
#==, #children, #comments, #comments_range, #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
335 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 335 def block_param; parameters.last end |
- (Boolean) call?
320 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 320 def call?; true end |
- (Object) method_name(name_only = false)
323 324 325 326 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 323 def method_name(name_only = false) name = self[index_adjust] name_only ? name.jump(:ident).first.to_sym : name end |
- (Object) namespace
321 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 321 def namespace; first if index_adjust > 0 end |
- (Object) parameters(include_block_param = true)
328 329 330 331 332 333 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 328 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 |