Class: PdfDataCollector
- Inherits:
-
Object
- Object
- PdfDataCollector
- Defined in:
- lib/data_collectors/graph/pdf_data_collector.rb
Instance Attribute Summary collapse
-
#graph_height_pdf ⇒ Object
readonly
Returns the value of attribute graph_height_pdf.
-
#graph_width_pdf ⇒ Object
readonly
Returns the value of attribute graph_width_pdf.
-
#input_data ⇒ Object
readonly
Returns the value of attribute input_data.
-
#scale ⇒ Object
readonly
Returns the value of attribute scale.
-
#y_labels ⇒ Object
readonly
Returns the value of attribute y_labels.
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(scale, input_data, graph_width_pdf, graph_height_pdf, y_labels) ⇒ PdfDataCollector
constructor
A new instance of PdfDataCollector.
Constructor Details
#initialize(scale, input_data, graph_width_pdf, graph_height_pdf, y_labels) ⇒ PdfDataCollector
Returns a new instance of PdfDataCollector.
3 4 5 6 7 8 9 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 3 def initialize(scale, input_data, graph_width_pdf, graph_height_pdf, y_labels) @scale = scale @input_data = input_data @graph_width_pdf = graph_width_pdf @graph_height_pdf = graph_height_pdf @y_labels = y_labels end |
Instance Attribute Details
#graph_height_pdf ⇒ Object (readonly)
Returns the value of attribute graph_height_pdf.
2 3 4 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 2 def graph_height_pdf @graph_height_pdf end |
#graph_width_pdf ⇒ Object (readonly)
Returns the value of attribute graph_width_pdf.
2 3 4 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 2 def graph_width_pdf @graph_width_pdf end |
#input_data ⇒ Object (readonly)
Returns the value of attribute input_data.
2 3 4 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 2 def input_data @input_data end |
#scale ⇒ Object (readonly)
Returns the value of attribute scale.
2 3 4 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 2 def scale @scale end |
#y_labels ⇒ Object (readonly)
Returns the value of attribute y_labels.
2 3 4 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 2 def y_labels @y_labels end |
Instance Method Details
#collect ⇒ Object
11 12 13 |
# File 'lib/data_collectors/graph/pdf_data_collector.rb', line 11 def collect x_pdf_data.zip(y_pdf_data).select { |x, y| [x, y] unless y.nil? } end |