Class: Voom::Presenters::DSL::Components::ToggleBase
- Defined in:
- lib/voom/presenters/dsl/components/toggle_base.rb
Overview
Base class used by toggle classes
Direct Known Subclasses
Instance Attribute Summary collapse
-
#checked ⇒ Object
Returns the value of attribute checked.
-
#off_value ⇒ Object
Returns the value of attribute off_value.
-
#text ⇒ Object
Returns the value of attribute text.
-
#text_color ⇒ Object
Returns the value of attribute text_color.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Input
Attributes inherited from EventBase
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ ToggleBase
constructor
A new instance of ToggleBase.
Methods inherited from Input
Methods included from Mixins::Tooltips
Methods included from Mixins::Event
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ ToggleBase
Returns a new instance of ToggleBase.
13 14 15 16 17 18 19 20 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 13 def initialize(**attribs_, &block) super(**attribs_, &block) @text = attribs.delete(:text) @text_color = attribs.delete(:text_color) @checked = attribs.delete(:checked) { false } @value = attribs.delete(:value) @off_value = attribs.delete(:off_value) end |
Instance Attribute Details
#checked ⇒ Object
Returns the value of attribute checked.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 7 def checked @checked end |
#off_value ⇒ Object
Returns the value of attribute off_value.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 7 def off_value @off_value end |
#text ⇒ Object
Returns the value of attribute text.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 7 def text @text end |
#text_color ⇒ Object
Returns the value of attribute text_color.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 7 def text_color @text_color end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/toggle_base.rb', line 7 def value @value end |