Class: ReVIEW::TOCParser::List
Instance Attribute Summary
Attributes inherited from Node
#children
Instance Method Summary
collapse
Methods inherited from Node
#add_child, #chapter?, #each_child, #each_node, #each_section, #each_section_with_index, #n_sections
Constructor Details
#initialize ⇒ List
Returns a new instance of List.
271
272
273
|
# File 'lib/review/tocparser.rb', line 271
def initialize
@lines = 0
end
|
Instance Method Details
#add(line) ⇒ Object
279
280
281
|
# File 'lib/review/tocparser.rb', line 279
def add(line)
@lines += 1
end
|
#estimated_lines ⇒ Object
283
284
285
|
# File 'lib/review/tocparser.rb', line 283
def estimated_lines
@lines + 2
end
|
275
276
277
|
# File 'lib/review/tocparser.rb', line 275
def inspect
"\#<#{self.class}>"
end
|
#yield_section ⇒ Object
287
288
|
# File 'lib/review/tocparser.rb', line 287
def yield_section
end
|