Class: ERBook::Document::Node
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ERBook::Document::Node
- Defined in:
- lib/erbook/document.rb
Instance Method Summary collapse
-
#chain? ⇒ Boolean
Include this node in the previous/next navigation chain?.
- #inline? ⇒ Boolean
- #ordinal_number? ⇒ Boolean
- #section_number? ⇒ Boolean
- #silent? ⇒ Boolean
-
#to_s ⇒ Object
Returns the output of this node.
Instance Method Details
#chain? ⇒ Boolean
Include this node in the previous/next navigation chain?
88 89 90 |
# File 'lib/erbook/document.rb', line 88 def chain? definition['chain'] end |
#inline? ⇒ Boolean
92 93 94 |
# File 'lib/erbook/document.rb', line 92 def inline? definition['inline'] end |
#ordinal_number? ⇒ Boolean
81 82 83 |
# File 'lib/erbook/document.rb', line 81 def ordinal_number? Array(definition['number']).include? 'ordinal' end |
#section_number? ⇒ Boolean
77 78 79 |
# File 'lib/erbook/document.rb', line 77 def section_number? Array(definition['number']).include? 'section' end |
#silent? ⇒ Boolean
96 97 98 |
# File 'lib/erbook/document.rb', line 96 def silent? definition['silent'] end |
#to_s ⇒ Object
Returns the output of this node.
69 70 71 72 73 74 75 |
# File 'lib/erbook/document.rb', line 69 def to_s if silent? '' else output end end |