Class: Termplot::DSL::Panel
- Inherits:
-
Object
- Object
- Termplot::DSL::Panel
- Defined in:
- lib/termplot/dsl/panels.rb
Instance Attribute Summary collapse
-
#cols ⇒ Object
Returns the value of attribute cols.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#start_col ⇒ Object
Returns the value of attribute start_col.
-
#start_row ⇒ Object
Returns the value of attribute start_row.
Instance Method Summary collapse
- #flatten ⇒ Object
-
#initialize(options, children = []) ⇒ Panel
constructor
A new instance of Panel.
- #set_dimensions(rows, cols, start_row, start_col) ⇒ Object
Methods included from WidgetDSL
#histogram, #statistics, #timeseries
Methods included from Commands
Constructor Details
#initialize(options, children = []) ⇒ Panel
Returns a new instance of Panel.
17 18 19 20 |
# File 'lib/termplot/dsl/panels.rb', line 17 def initialize(, children = []) @options = @children = children end |
Instance Attribute Details
#cols ⇒ Object
Returns the value of attribute cols.
10 11 12 |
# File 'lib/termplot/dsl/panels.rb', line 10 def cols @cols end |
#rows ⇒ Object
Returns the value of attribute rows.
10 11 12 |
# File 'lib/termplot/dsl/panels.rb', line 10 def rows @rows end |
#start_col ⇒ Object
Returns the value of attribute start_col.
10 11 12 |
# File 'lib/termplot/dsl/panels.rb', line 10 def start_col @start_col end |
#start_row ⇒ Object
Returns the value of attribute start_row.
10 11 12 |
# File 'lib/termplot/dsl/panels.rb', line 10 def start_row @start_row end |
Instance Method Details
#flatten ⇒ Object
26 27 28 |
# File 'lib/termplot/dsl/panels.rb', line 26 def flatten children.map(&:flatten).flatten end |
#set_dimensions(rows, cols, start_row, start_col) ⇒ Object
22 23 24 |
# File 'lib/termplot/dsl/panels.rb', line 22 def set_dimensions(rows, cols, start_row, start_col) raise "Must be implemented" end |