Class: ReVIEW::TOCParser::List

Inherits:
Node show all
Defined in:
lib/review/tocparser.rb

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

#initializeList

Returns a new instance of List.



265
266
267
# File 'lib/review/tocparser.rb', line 265

def initialize
  @lines = 0
end

Instance Method Details

#add(line) ⇒ Object



273
274
275
# File 'lib/review/tocparser.rb', line 273

def add(line)
  @lines += 1
end

#estimated_linesObject



277
278
279
# File 'lib/review/tocparser.rb', line 277

def estimated_lines
  @lines + 2
end

#inspectObject



269
270
271
# File 'lib/review/tocparser.rb', line 269

def inspect
  "\#<#{self.class}>"
end

#yield_sectionObject



281
282
# File 'lib/review/tocparser.rb', line 281

def yield_section
end