Class: Statusboard::TableWidget

Inherits:
WidgetBase show all
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

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

#renderObject



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