Class: Statusboard::WidgetBase

Inherits:
Object
  • Object
show all
Defined in:
lib/statusboard/widgets/base.rb

Overview

(Abstract) class that represents a widget which can be displayed using the Status Board app. The class must be subclassed for each supported widget type.

Direct Known Subclasses

DiyWidget, GraphWidget, TableWidget

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ WidgetBase

Each widget must be initialized using a DSL. When creating the widget, the block containing the DSL statements must be specified in the constructor.



14
15
16
# File 'lib/statusboard/widgets/base.rb', line 14

def initialize(&block)
	raise "Not implemented."
end

Instance Method Details

#renderObject

Method that renders the specific widget into a (text-)format understandable by the Status Board app.



20
21
22
# File 'lib/statusboard/widgets/base.rb', line 20

def render
	raise "Not implemented."
end