Class: Plot::PlotProxy
- Inherits:
-
Object
- Object
- Plot::PlotProxy
- Defined in:
- lib/plot/plot.rb
Instance Method Summary collapse
-
#initialize(plot) ⇒ PlotProxy
constructor
A new instance of PlotProxy.
- #mark(type, id, &block) ⇒ Object
- #plot_options(**options) ⇒ Object
Constructor Details
#initialize(plot) ⇒ PlotProxy
Returns a new instance of PlotProxy.
21 22 23 |
# File 'lib/plot/plot.rb', line 21 def initialize(plot) @plot = plot end |
Instance Method Details
#mark(type, id, &block) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/plot/plot.rb', line 25 def mark(type, id, &block) mark = Plot::Mark.new(nil) mark_proxy = Plot::MarkProxy.new(mark, type) mark_proxy.instance_eval(&block) @plot.add_mark(id, mark) end |
#plot_options(**options) ⇒ Object
32 33 34 |
# File 'lib/plot/plot.rb', line 32 def (**) @plot. = end |