Class: ReVIEW::Book::PageMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/review/book/page_metric.rb

Defined Under Namespace

Classes: MetricData

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(list_lines, list_columns, text_lines, text_columns, page_per_kbyte) ⇒ PageMetric

Returns a new instance of PageMetric.



26
27
28
29
30
# File 'lib/review/book/page_metric.rb', line 26

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

#listObject (readonly)

Returns the value of attribute list.



32
33
34
# File 'lib/review/book/page_metric.rb', line 32

def list
  @list
end

#page_per_kbyteObject (readonly)

Returns the value of attribute page_per_kbyte.



34
35
36
# File 'lib/review/book/page_metric.rb', line 34

def page_per_kbyte
  @page_per_kbyte
end

#textObject (readonly)

Returns the value of attribute text.



33
34
35
# File 'lib/review/book/page_metric.rb', line 33

def text
  @text
end

Class Method Details

.a5Object



18
19
20
# File 'lib/review/book/page_metric.rb', line 18

def PageMetric.a5
  new(46, 80, 30, 74, 1)
end

.b5Object



22
23
24
# File 'lib/review/book/page_metric.rb', line 22

def PageMetric.b5
  new(46, 80, 30, 74, 2)
end