class ReVIEW::TOCParser::Paragraph

Public Class Methods

new(chap) click to toggle source
# File lib/review/tocparser.rb, line 245
def initialize(chap)
  @bytes = 0
  @page_metric = chap.book.page_metric
end

Public Instance Methods

add(line) click to toggle source
# File lib/review/tocparser.rb, line 254
def add(line)
  @bytes += line.strip.bytesize
end
estimated_lines() click to toggle source
# File lib/review/tocparser.rb, line 258
def estimated_lines
  (@bytes + 2) / @page_metric.text.n_columns + 1
end
inspect() click to toggle source
# File lib/review/tocparser.rb, line 250
def inspect
  "\#<#{self.class}>"
end
yield_section() click to toggle source
# File lib/review/tocparser.rb, line 262
def yield_section
end