Class: SydneyAliasFile::Section
- Inherits:
-
SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- SyntaxNode
- SydneyAliasFile::Section
- Defined in:
- lib/sydney/sydney_alias_file/node_extensions.rb
Instance Method Summary collapse
-
#entries ⇒ Object
Return the AliasEntry nodes as an array.
-
#title ⇒ Object
Return all the ‘##’-led lines in the section as a single string.
Methods inherited from SyntaxNode
Instance Method Details
#entries ⇒ Object
Return the AliasEntry nodes as an array
28 29 30 |
# File 'lib/sydney/sydney_alias_file/node_extensions.rb', line 28 def entries content.elements end |
#title ⇒ Object
Return all the ‘##’-led lines in the section as a single string
23 24 25 |
# File 'lib/sydney/sydney_alias_file/node_extensions.rb', line 23 def title section_title.elements.map(&:to_s).join(' ') end |