Sha256: 33c241c5e0b7a6b39e14f8342f61348f6dad0c0e283bb0a9183e0326e066e336
Contents?: true
Size: 573 Bytes
Versions: 1
Compression:
Stored size: 573 Bytes
Contents
require "statusboard/widgets/base" require "json" module Statusboard # 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. class GraphWidget < WidgetBase # Initializes a new graph widget instance using the configuration # and data source specified in the block. The block is excepted to # use the DSL. def initialize(&block) @graph_description = DSL::GraphDescription.new(&block) end def render @graph_description.construct.to_json end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
statusboard-0.1.0 | lib/statusboard/widgets/graph.rb |