Sha256: 5f0fe914fd1424d9959a71e4c054d572470fa91345b4784c333a14af7e9141cf
Contents?: true
Size: 1.21 KB
Versions: 13
Compression:
Stored size: 1.21 KB
Contents
# # $Id: book.rb 4315 2009-09-02 04:15:24Z kmuto $ # # Copyright (c) 2002-2008 Minero Aoki # 2009 Minero Aoki, Kenshi Muto # # 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. # For details of the GNU LGPL, see the file "COPYING". # module ReVIEW module Book class PageMetric MetricData = Struct.new(:n_lines, :n_columns) def initialize(list_lines, list_columns, text_lines, text_columns, page_per_kbyte) @list = MetricData.new(list_lines, list_columns) @text = MetricData.new(text_lines, text_columns) @page_per_kbyte = page_per_kbyte end A5 = PageMetric.new(46, 80, 30, 74, 1) B5 = PageMetric.new(46, 80, 30, 74, 2) # backward compatible def PageMetric.a5 ReVIEW::Book::PageMetric::A5 end # backward compatible def PageMetric.b5 ReVIEW::Book::PageMetric::B5 end attr_reader :list attr_reader :text attr_reader :page_per_kbyte def ==(other) self.list == other.list && self.text == other.text && self.page_per_kbyte == other.page_per_kbyte end end end end
Version data entries
13 entries across 13 versions & 2 rubygems