Class: Voom::Presenters::DSL::Components::IconToggle
- Inherits:
-
ToggleBase
- Object
- Base
- EventBase
- Input
- ToggleBase
- Voom::Presenters::DSL::Components::IconToggle
- Defined in:
- lib/voom/presenters/dsl/components/icon_toggle.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#selected ⇒ Object
Returns the value of attribute selected.
Attributes inherited from ToggleBase
Attributes inherited from Input
Attributes inherited from EventBase
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #context, #id, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ IconToggle
constructor
A new instance of IconToggle.
Methods included from Mixins::Tooltips
Methods included from Mixins::Event
Methods inherited from Base
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ IconToggle
Returns a new instance of IconToggle.
10 11 12 13 14 15 16 |
# File 'lib/voom/presenters/dsl/components/icon_toggle.rb', line 10 def initialize(**attribs_, &block) super(type: :icon_toggle, context: context, **attribs_, &block) @icon = attribs.delete(:icon) @selected = attribs.delete(:selected) || false @disabled = attribs.delete(:disabled) || false end |
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/icon_toggle.rb', line 8 def disabled @disabled end |
#icon ⇒ Object
Returns the value of attribute icon.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/icon_toggle.rb', line 8 def icon @icon end |
#selected ⇒ Object
Returns the value of attribute selected.
8 9 10 |
# File 'lib/voom/presenters/dsl/components/icon_toggle.rb', line 8 def selected @selected end |