Class: Bumpspark::Graph

Inherits:
Object
  • Object
show all
Includes:
Formats::DataURI, Formats::PNG, Formats::String, Scale
Defined in:
lib/bumpspark/graph.rb

Constant Summary

Constants included from Formats::PNG

Formats::PNG::BLACK, Formats::PNG::GREY, Formats::PNG::HEADER, Formats::PNG::RED

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Formats::DataURI

#to_data_uri

Methods included from Formats::String

#to_s

Methods included from Formats::PNG

#to_png

Methods included from Scale

#scaled_numbers

Constructor Details

#initialize(numbers, scale = 1) ⇒ Graph

Returns a new instance of Graph.



16
17
18
19
# File 'lib/bumpspark/graph.rb', line 16

def initialize(numbers, scale = 1)
  @numbers = numbers
  @scale = scale
end

Instance Attribute Details

#numbersObject (readonly)

Returns the value of attribute numbers.



15
16
17
# File 'lib/bumpspark/graph.rb', line 15

def numbers
  @numbers
end

#scaleObject (readonly)

Returns the value of attribute scale.



15
16
17
# File 'lib/bumpspark/graph.rb', line 15

def scale
  @scale
end