Class: ReVIEW::Book::PageMetric
- Defined in:
- lib/review/book/page_metric.rb
Defined Under Namespace
Classes: MetricData
Constant Summary collapse
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.
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.
27 28 29 |
# File 'lib/review/book/page_metric.rb', line 27 def list @list end |
#page_per_kbyte ⇒ Object (readonly)
Returns the value of attribute page_per_kbyte.
29 30 31 |
# File 'lib/review/book/page_metric.rb', line 29 def page_per_kbyte @page_per_kbyte end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
28 29 30 |
# File 'lib/review/book/page_metric.rb', line 28 def text @text end |
Instance Method Details
#==(other) ⇒ Object
31 32 33 |
# File 'lib/review/book/page_metric.rb', line 31 def ==(other) self.list == other.list && self.text == other.text && self.page_per_kbyte == other.page_per_kbyte end |