Class: EbnfExpression::Namespace

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

Direct Known Subclasses

Klass, Mixin

Instance Method Summary collapse

Methods inherited from Base

#full_name, #inspect, #returns, #to_s

Instance Method Details

#klass_nameObject



193
194
195
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 193

def klass_name
  nil
end

#mixinsObject



205
206
207
208
209
210
211
212
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 205

def mixins
  second_line = elements.last
  if second_line.empty?
    []
  else
    [second_line.js_namespace].concat(second_line.more.elements.map{|e| e.elements.last})
  end
end

#nameObject



197
198
199
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 197

def name
  js_namespace.to_a.last
end

#namespaceObject



201
202
203
# File 'lib/pdoc/parser/ebnf_expression_nodes.rb', line 201

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