Class: Documentation::Doc
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Documentation::Doc
- Includes:
- Enumerable
- Defined in:
- lib/pdoc/parser/documentation_nodes.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#find_by_name(name) ⇒ Object
find_by_name allows you to search through all the documented instances based on the instances Base#full_name.
- #inspect ⇒ Object
- #name ⇒ Object
- #serialize(serializer) ⇒ Object
-
#size ⇒ Object
Returns the total number of documented instances.
- #tags ⇒ Object
Instance Method Details
#each ⇒ Object
9 10 11 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 9 def each .each { |tag| yield tag } end |
#find_by_name(name) ⇒ Object
20 21 22 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 20 def find_by_name(name) find { |e| e.full_name == name } end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 24 def inspect to_a.inspect end |
#name ⇒ Object
33 34 35 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 33 def name "Home" end |
#serialize(serializer) ⇒ Object
37 38 39 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 37 def serialize(serializer) each { |obj| obj.serialize(serializer) } end |
#size ⇒ Object
Returns the total number of documented instances
29 30 31 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 29 def size to_a.length end |
#tags ⇒ Object
5 6 7 |
# File 'lib/pdoc/parser/documentation_nodes.rb', line 5 def @tags ||= elements.first.elements.map { |e| e.elements.last } end |