Class: YARD::Parser::Ruby::MethodDefinitionNode
Managing node state
collapse
Instance Method Details
#def? ⇒ Boolean
463
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 463
def def?; true end
|
#kw? ⇒ Boolean
462
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 462
def kw?; true end
|
#method_name(name_only = false) ⇒ Object
466
467
468
469
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 466
def method_name(name_only = false)
name = self[index_adjust]
name_only ? name.jump(:ident).first.to_sym : name
end
|
#namespace ⇒ Object
464
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 464
def namespace; first if index_adjust > 0 end
|
#parameters(include_block_param = true) ⇒ Object
471
472
473
474
475
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 471
def parameters(include_block_param = true)
params = self[1 + index_adjust]
params = params[0] if params.type == :paren
include_block_param ? params : params[0...-1]
end
|