Class: Termplot::WidgetDSL::HistogramConfig
- Inherits:
-
WidgetConfig
- Object
- WidgetConfig
- Termplot::WidgetDSL::HistogramConfig
- Defined in:
- lib/termplot/dsl/widgets.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
Attributes inherited from WidgetConfig
#col, #cols, #command, #debug, #interval, #row, #rows, #title
Instance Method Summary collapse
Methods inherited from WidgetConfig
#flatten, #initialize, #positioned_widget, #producer_options, #set_dimensions
Constructor Details
This class inherits a constructor from Termplot::WidgetDSL::WidgetConfig
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
112 113 114 |
# File 'lib/termplot/dsl/widgets.rb', line 112 def color @color end |
Instance Method Details
#post_initialize(opts) ⇒ Object
113 114 115 |
# File 'lib/termplot/dsl/widgets.rb', line 113 def post_initialize(opts) @color = opts[:color] end |
#widget ⇒ Object
117 118 119 120 121 122 123 124 125 |
# File 'lib/termplot/dsl/widgets.rb', line 117 def @widget ||= Termplot::Widgets::HistogramWidget.new( title: title, color: color, cols: cols, rows: rows, debug: debug ) end |