Class: ReVIEW::Book::PageMetric
- Defined in:
- lib/review/book/page_metric.rb
Defined Under Namespace
Classes: MetricData
Constant Summary collapse
- A5 =
PageMetric.new(46, 80, 30, 74, 1)
- B5 =
PageMetric.new(46, 80, 30, 74, 2)
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#page_per_kbyte ⇒ Object
readonly
Returns the value of attribute page_per_kbyte.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
-
.a5 ⇒ Object
backward compatible.
-
.b5 ⇒ Object
backward compatible.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(list_lines, list_columns, text_lines, text_columns, page_per_kbyte) ⇒ PageMetric
constructor
A new instance of PageMetric.
Constructor Details
#initialize(list_lines, list_columns, text_lines, text_columns, page_per_kbyte) ⇒ PageMetric
Returns a new instance of PageMetric.
18 19 20 21 22 |
# File 'lib/review/book/page_metric.rb', line 18 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 |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
37 38 39 |
# File 'lib/review/book/page_metric.rb', line 37 def list @list end |
#page_per_kbyte ⇒ Object (readonly)
Returns the value of attribute page_per_kbyte.
39 40 41 |
# File 'lib/review/book/page_metric.rb', line 39 def page_per_kbyte @page_per_kbyte end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
38 39 40 |
# File 'lib/review/book/page_metric.rb', line 38 def text @text end |
Class Method Details
.a5 ⇒ Object
backward compatible
28 29 30 |
# File 'lib/review/book/page_metric.rb', line 28 def PageMetric.a5 ReVIEW::Book::PageMetric::A5 end |
.b5 ⇒ Object
backward compatible
33 34 35 |
# File 'lib/review/book/page_metric.rb', line 33 def PageMetric.b5 ReVIEW::Book::PageMetric::B5 end |
Instance Method Details
#==(other) ⇒ Object
41 42 43 |
# File 'lib/review/book/page_metric.rb', line 41 def ==(other) self.list == other.list && self.text == other.text && self.page_per_kbyte == other.page_per_kbyte end |