class ReVIEW::TOCParser::Paragraph

Public Class Methods

new(chap) click to toggle source
# File lib/review/tocparser.rb, line 229
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 238
def add(line)
  @bytes += line.strip.bytesize
end
estimated_lines() click to toggle source
# File lib/review/tocparser.rb, line 242
def estimated_lines
  (@bytes + 2) / @page_metric.text.n_columns + 1
end
inspect() click to toggle source
# File lib/review/tocparser.rb, line 234
def inspect
  "#<#{self.class}>"
end
yield_section() click to toggle source
# File lib/review/tocparser.rb, line 246
def yield_section
end