Class: Ruflet::UI::Services::RufletServicesComponents::FlashlightControl

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

Constant Summary collapse

TYPE =
"flashlight".freeze
WIRE =
"Flashlight".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, data: nil, key: nil, on_error: nil) ⇒ FlashlightControl

Returns a new instance of FlashlightControl.



11
12
13
14
15
16
17
# File 'lib/ruflet_ui/ruflet/ui/services/ruflet/flashlight_control.rb', line 11

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