Class: Ruflet::UI::Services::RufletServicesComponents::BarometerControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/services/ruflet/barometer_control.rb

Constant Summary collapse

TYPE =
"barometer".freeze
WIRE =
"Barometer".freeze

Constants inherited from Control

Control::HOST_EXPANDED_TYPES

Instance Attribute Summary

Attributes inherited from Control

#children, #id, #props, #runtime_page, #type, #wire_id

Instance Method Summary collapse

Methods inherited from Control

#emit, generate_id, #has_handler?, #on, #to_patch

Constructor Details

#initialize(id: nil, cancel_on_error: nil, data: nil, enabled: nil, interval: nil, key: nil, on_error: nil, on_reading: nil) ⇒ BarometerControl

Returns a new instance of BarometerControl.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ruflet_ui/ruflet/ui/services/ruflet/barometer_control.rb', line 11

def initialize(id: nil, cancel_on_error: nil, data: nil, enabled: nil, interval: nil, key: nil, on_error: nil, on_reading: nil)
  props = {}
  props[:cancel_on_error] = cancel_on_error unless cancel_on_error.nil?
  props[:data] = data unless data.nil?
  props[:enabled] = enabled unless enabled.nil?
  props[:interval] = interval unless interval.nil?
  props[:key] = key unless key.nil?
  props[:on_error] = on_error unless on_error.nil?
  props[:on_reading] = on_reading unless on_reading.nil?
  super(type: TYPE, id: id, **props)
end