lib/review/book/volume.rb in review-1.4.0 vs lib/review/book/volume.rb in review-1.5.0

- old
+ new

@@ -34,22 +34,23 @@ def initialize(bytes = 0, chars = 0, lines = 0) @bytes = bytes @chars = chars @lines = lines - @book = ReVIEW::Book::Base.load_default + @page_per_kbyte = nil end attr_reader :bytes attr_reader :chars attr_accessor :lines + attr_accessor :page_per_kbyte def kbytes (@bytes.to_f / 1024).ceil end def page - (kbytes.to_f/@book.page_metric.page_per_kbyte).ceil + (kbytes.to_f/@page_per_kbyte).ceil end def to_s "#{kbytes()}KB #{@chars}C #{@lines}L #{page()}P" end