Class: MiniHistogram::MiniUnicodePlot::Renderer
- Inherits:
-
Object
- Object
- MiniHistogram::MiniUnicodePlot::Renderer
- Includes:
- BorderPrinter
- Defined in:
- lib/mini_histogram/plot.rb
Constant Summary
Constants included from StyledPrinter
StyledPrinter::COLOR_DECODE, StyledPrinter::COLOR_ENCODE, StyledPrinter::DISABLE_TEXT_STYLE, StyledPrinter::TEXT_COLORS
Instance Attribute Summary collapse
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#plot ⇒ Object
readonly
Returns the value of attribute plot.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(plot) ⇒ Renderer
constructor
A new instance of Renderer.
- #render(out) ⇒ Object
Methods included from BorderPrinter
#print_border_bottom, #print_border_top
Methods included from StyledPrinter
#color?, #print_color, #print_styled
Constructor Details
#initialize(plot) ⇒ Renderer
Returns a new instance of Renderer.
387 388 389 390 |
# File 'lib/mini_histogram/plot.rb', line 387 def initialize(plot) @plot = plot @out = nil end |
Instance Attribute Details
#out ⇒ Object (readonly)
Returns the value of attribute out.
393 394 395 |
# File 'lib/mini_histogram/plot.rb', line 393 def out @out end |
#plot ⇒ Object (readonly)
Returns the value of attribute plot.
392 393 394 |
# File 'lib/mini_histogram/plot.rb', line 392 def plot @plot end |
Class Method Details
.render(out, plot) ⇒ Object
383 384 385 |
# File 'lib/mini_histogram/plot.rb', line 383 def self.render(out, plot) new(plot).render(out) end |
Instance Method Details
#render(out) ⇒ Object
395 396 397 398 399 400 401 402 |
# File 'lib/mini_histogram/plot.rb', line 395 def render(out) @out = out init_render render_top render_rows render_bottom end |