Class: ReVIEW::TOCParser::Paragraph
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
Returns a new instance of Paragraph.
242
243
244
|
# File 'lib/review/tocparser.rb', line 242
def initialize
@bytes = 0
end
|
Instance Method Details
#add(line) ⇒ Object
250
251
252
|
# File 'lib/review/tocparser.rb', line 250
def add(line)
@bytes += line.strip.bytesize
end
|
#estimated_lines ⇒ Object
254
255
256
|
# File 'lib/review/tocparser.rb', line 254
def estimated_lines
(@bytes + 2) / ReVIEW.book.page_metric.text.n_columns + 1
end
|
246
247
248
|
# File 'lib/review/tocparser.rb', line 246
def inspect
"\#<#{self.class}>"
end
|
#yield_section ⇒ Object
258
259
|
# File 'lib/review/tocparser.rb', line 258
def yield_section
end
|