Class: ReVIEW::Book::PageMetric
- Defined in:
- lib/review/book/page_metric.rb
Defined Under Namespace
Classes: MetricData
Constant Summary collapse
- A5 =
based on review-jsbook’s default
PageMetric.new(40, 34, 29, 34)
- B5 =
PageMetric.new(50, 40, 36, 40)
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(list_lines, list_columns, text_lines, text_columns, _page_per_kbyte = 1) ⇒ PageMetric
constructor
A new instance of PageMetric.
Constructor Details
#initialize(list_lines, list_columns, text_lines, text_columns, _page_per_kbyte = 1) ⇒ PageMetric
Returns a new instance of PageMetric.
14 15 16 17 18 |
# File 'lib/review/book/page_metric.rb', line 14 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 |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
24 25 26 |
# File 'lib/review/book/page_metric.rb', line 24 def list @list end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
25 26 27 |
# File 'lib/review/book/page_metric.rb', line 25 def text @text end |
Instance Method Details
#==(other) ⇒ Object
27 28 29 |
# File 'lib/review/book/page_metric.rb', line 27 def ==(other) self.list == other.list && self.text == other.text end |