Class: Flammarion::Writeable::Spectrum
- Inherits:
-
Object
- Object
- Flammarion::Writeable::Spectrum
- Defined in:
- lib/flammarion/writeable.rb
Instance Attribute Summary collapse
-
#front_end ⇒ Object
readonly
Returns the value of attribute front_end.
Instance Method Summary collapse
-
#initialize(id, target, front_end) ⇒ Spectrum
constructor
A new instance of Spectrum.
- #plot(data, options = {}) ⇒ Object
Constructor Details
#initialize(id, target, front_end) ⇒ Spectrum
Returns a new instance of Spectrum.
31 32 33 34 35 |
# File 'lib/flammarion/writeable.rb', line 31 def initialize(id, target, front_end) @id = id @target = target @front_end = front_end end |
Instance Attribute Details
#front_end ⇒ Object (readonly)
Returns the value of attribute front_end.
30 31 32 |
# File 'lib/flammarion/writeable.rb', line 30 def front_end @front_end end |
Instance Method Details
#plot(data, options = {}) ⇒ Object
37 38 39 |
# File 'lib/flammarion/writeable.rb', line 37 def plot(data, = {}) @front_end.send_json({action:'plot', id:@id, target:@target, data:data}.merge()) end |