Class: Ruflet::UI::Controls::RufletComponents::PathControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/controls/shared/path_control.rb

Constant Summary collapse

TYPE =
"path".freeze
WIRE =
"Path".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, elements: nil, key: nil, paint: nil) ⇒ PathControl

Returns a new instance of PathControl.



11
12
13
14
15
16
17
18
# File 'lib/ruflet_ui/ruflet/ui/controls/shared/path_control.rb', line 11

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