Class: Charty::Plotters::AbstractPlotter
- Inherits:
-
Object
- Object
- Charty::Plotters::AbstractPlotter
- Defined in:
- lib/charty/plotters/abstract_plotter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#data ⇒ Object
Returns the value of attribute data.
-
#palette ⇒ Object
Returns the value of attribute palette.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, color, **options) {|_self| ... } ⇒ AbstractPlotter
constructor
A new instance of AbstractPlotter.
- #to_iruby ⇒ Object
Constructor Details
#initialize(x, y, color, **options) {|_self| ... } ⇒ AbstractPlotter
Returns a new instance of AbstractPlotter.
4 5 6 7 8 9 10 11 12 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 4 def initialize(x, y, color, **) self.x = x self.y = y self.color = color self.data = data self.palette = palette () yield self if block_given? end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
14 15 16 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 14 def color @color end |
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 14 def data @data end |
#palette ⇒ Object
Returns the value of attribute palette.
14 15 16 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 14 def palette @palette end |
#x ⇒ Object
Returns the value of attribute x.
14 15 16 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 14 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
14 15 16 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 14 def y @y end |
Instance Method Details
#to_iruby ⇒ Object
75 76 77 78 |
# File 'lib/charty/plotters/abstract_plotter.rb', line 75 def to_iruby result = render ["text/html", result] if result end |