class ReVIEW::Paragraph

Public Class Methods

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