class Statusboard::GraphWidget

Class which represents graph widgets for Status Board. The widget is configured and filled with data using a DSL whoch is passed to the constructor.

Public Class Methods

new(&block) click to toggle source

Initializes a new graph widget instance using the configuration and data source specified in the block. The block is excepted to use the DSL.

# File lib/statusboard/widgets/graph.rb, line 14
def initialize(&block)
        @graph_description = DSL::GraphDescription.new(&block)
end

Public Instance Methods

render() click to toggle source
# File lib/statusboard/widgets/graph.rb, line 18
def render
        @graph_description.construct.to_json
end