Class: ReVIEW::TOCParser::Chapter
- Defined in:
- lib/review/tocparser.rb
Instance Attribute Summary collapse
-
#chapter_id ⇒ Object
readonly
Returns the value of attribute chapter_id.
-
#number ⇒ Object
Returns the value of attribute number.
Attributes inherited from Section
Attributes inherited from Node
Instance Method Summary collapse
- #chapter? ⇒ Boolean
-
#initialize(label, id, path) ⇒ Chapter
constructor
A new instance of Chapter.
- #inspect ⇒ Object
- #volume ⇒ Object
Methods inherited from Section
#display_label, #estimated_lines, #yield_section
Methods inherited from Node
#add_child, #each_child, #each_node, #each_section, #each_section_with_index, #n_sections
Constructor Details
#initialize(label, id, path) ⇒ Chapter
Returns a new instance of Chapter.
209 210 211 212 213 214 215 |
# File 'lib/review/tocparser.rb', line 209 def initialize(label, id, path) super 1, label, path @chapter_id = id @path = path @volume = nil @number = nil end |
Instance Attribute Details
#chapter_id ⇒ Object (readonly)
Returns the value of attribute chapter_id.
223 224 225 |
# File 'lib/review/tocparser.rb', line 223 def chapter_id @chapter_id end |
#number ⇒ Object
Returns the value of attribute number.
217 218 219 |
# File 'lib/review/tocparser.rb', line 217 def number @number end |
Instance Method Details
#chapter? ⇒ Boolean
219 220 221 |
# File 'lib/review/tocparser.rb', line 219 def chapter? true end |
#inspect ⇒ Object
233 234 235 |
# File 'lib/review/tocparser.rb', line 233 def inspect "\#<#{self.class} #{@filename}>" end |