Class: EbnfExpression::KlassMethod

Inherits:
Method
  • Object
show all
Defined in:
lib/pdoc/parser/ebnf_expression_nodes.rb

Instance Method Summary collapse

Methods inherited from Method

#arguments

Methods inherited from Base

#full_name, #inspect, #returns, #to_s

Instance Method Details

#klass_nameObject



47
48
49
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 47

def klass_name
  js_namespace.to_a.slice(-2)
end

#methodized?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 55

def methodized?
  args.methodize.text_value == '@'
end

#nameObject



51
52
53
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 51

def name
  js_namespace.to_a.last
end

#namespaceObject



59
60
61
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 59

def namespace
  js_namespace.to_a.slice(0..-2).join(".")
end

#signatureObject



63
64
65
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 63

def signature
  "#{namespace}.#{name}#{args.text_value.sub('@', '')}"
end