Sha256: 1284a0feed3c662925f58a7f95275befdf524f6260581331e302288a72ba1f30

Contents?: true

Size: 976 Bytes

Versions: 13

Compression:

Stored size: 976 Bytes

Contents

# Copyright (c) 2009-2020 Minero Aoki, Kenshi Muto
#               2002-2008 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.
# 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 = 1)
        # page_per_kbyte is obsolete. Just for backward compatibility
        @list = MetricData.new(list_lines, list_columns)
        @text = MetricData.new(text_lines, text_columns)
      end

      # based on review-jsbook's default
      A5 = PageMetric.new(40, 34, 29, 34)
      B5 = PageMetric.new(50, 40, 36, 40)

      attr_reader :list
      attr_reader :text

      def ==(other)
        self.list == other.list && self.text == other.text
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
review-5.10.0 lib/review/book/page_metric.rb
review-5.9.0 lib/review/book/page_metric.rb
review-5.8.0 lib/review/book/page_metric.rb
review-5.7.0 lib/review/book/page_metric.rb
review-5.6.0 lib/review/book/page_metric.rb
review-5.5.0 lib/review/book/page_metric.rb
review-5.4.0 lib/review/book/page_metric.rb
review-5.3.0 lib/review/book/page_metric.rb
review-5.2.0 lib/review/book/page_metric.rb
review-5.1.1 lib/review/book/page_metric.rb
review-5.1.0 lib/review/book/page_metric.rb
review-5.0.0 lib/review/book/page_metric.rb
review-4.2.0 lib/review/book/page_metric.rb