Class: PdfDataCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/data_collectors/graph/pdf_data_collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pdfObject (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_pdfObject (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_dataObject (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

#scaleObject (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_labelsObject (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

#collectObject



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