Class: Zui::Component
- Inherits:
-
Object
- Object
- Zui::Component
- Defined in:
- lib/zui/component_registry.rb
Instance Attribute Summary collapse
-
#auto_bind ⇒ Object
readonly
Returns the value of attribute auto_bind.
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#event_map ⇒ Object
readonly
Returns the value of attribute event_map.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#property_map ⇒ Object
readonly
Returns the value of attribute property_map.
-
#qml ⇒ Object
readonly
Returns the value of attribute qml.
Instance Method Summary collapse
-
#initialize(name:, qml:, properties:, events:, property_map:, event_map:, container:, auto_bind:) ⇒ Component
constructor
A new instance of Component.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, qml:, properties:, events:, property_map:, event_map:, container:, auto_bind:) ⇒ Component
Returns a new instance of Component.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/zui/component_registry.rb', line 7 def initialize(name:, qml:, properties:, events:, property_map:, event_map:, container:, auto_bind:) @name = name @qml = qml @properties = properties @events = events @property_map = property_map @event_map = event_map @container = container @auto_bind = auto_bind end |
Instance Attribute Details
#auto_bind ⇒ Object (readonly)
Returns the value of attribute auto_bind.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def auto_bind @auto_bind end |
#container ⇒ Object (readonly)
Returns the value of attribute container.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def container @container end |
#event_map ⇒ Object (readonly)
Returns the value of attribute event_map.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def event_map @event_map end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def events @events end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def properties @properties end |
#property_map ⇒ Object (readonly)
Returns the value of attribute property_map.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def property_map @property_map end |
#qml ⇒ Object (readonly)
Returns the value of attribute qml.
5 6 7 |
# File 'lib/zui/component_registry.rb', line 5 def qml @qml end |
Instance Method Details
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/zui/component_registry.rb', line 18 def to_h { "qml" => qml, "properties" => properties.map(&:to_s), "events" => events.map(&:to_s), "property_map" => property_map.transform_keys(&:to_s).transform_values(&:to_s), "event_map" => event_map.transform_keys(&:to_s).transform_values(&:to_s), "container" => container, "auto_bind" => auto_bind } end |