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, #section_size

Constructor Details

#initializeList

Returns a new instance of List.



251
252
253
# File 'lib/review/tocparser.rb', line 251

def initialize
  @lines = 0
end

Instance Method Details

#add(_line) ⇒ Object



259
260
261
# File 'lib/review/tocparser.rb', line 259

def add(_line)
  @lines += 1
end

#estimated_linesObject



263
264
265
# File 'lib/review/tocparser.rb', line 263

def estimated_lines
  @lines + 2
end

#inspectObject



255
256
257
# File 'lib/review/tocparser.rb', line 255

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

#yield_sectionObject



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

def yield_section
end