Class: Tiler::Widgets::Clock
- Inherits:
-
Tiler::Widget
- Object
- Tiler::Widget
- Tiler::Widgets::Clock
- Defined in:
- lib/tiler/widgets/clock.rb
Instance Attribute Summary
Attributes inherited from Tiler::Widget
Instance Method Summary collapse
Methods inherited from Tiler::Widget
#empty?, example_config, example_payload, example_preview, #initialize, #label, #partial, #query_class, supports_color_config?, supports_palette_config?
Constructor Details
This class inherits a constructor from Tiler::Widget
Instance Method Details
#data ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/tiler/widgets/clock.rb', line 13 def data # show_date defaults true per catalog; only an explicit false hides it. show_date = config.key?("show_date") ? !!config["show_date"] : true { timezone: config["timezone"], format: config["format"] || "24h", show_date: show_date } end |