lib/review/book/volume.rb in review-4.1.0 vs lib/review/book/volume.rb in review-4.2.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2007-2017 Minero Aoki, Kenshi Muto +# Copyright (c) 2007-2020 Minero Aoki, Kenshi Muto # 2002-2007 Minero Aoki # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. @@ -31,23 +31,22 @@ def initialize(bytes = 0, chars = 0, lines = 0) @bytes = bytes @chars = chars @lines = lines - @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 / @page_per_kbyte).ceil + # XXX:unrelibable + kbytes.to_f.ceil end def to_s "#{kbytes}KB #{@chars}C #{@lines}L #{page}P" end