Class: Statusboard::TableWidget
- Inherits:
-
WidgetBase
- Object
- WidgetBase
- Statusboard::TableWidget
- Defined in:
- lib/statusboard/widgets/table.rb
Overview
Class which represents table widgets for Status Board. The widget is configured and filled with data using a DSL which is passed to the constructor.
Instance Method Summary collapse
-
#initialize(&block) ⇒ TableWidget
constructor
A new instance of TableWidget.
- #render ⇒ Object
Constructor Details
#initialize(&block) ⇒ TableWidget
Returns a new instance of TableWidget.
10 11 12 |
# File 'lib/statusboard/widgets/table.rb', line 10 def initialize(&block) @table_description = DSL::TableDescription.new(&block) end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 |
# File 'lib/statusboard/widgets/table.rb', line 14 def render table_data = @table_description.construct render_template("table.erb", table_data) end |