Class: Voom::Presenters::DSL::Components::IconBase
- Includes:
- Mixins::Tooltips
- Defined in:
- lib/voom/presenters/dsl/components/icon_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
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) ⇒ IconBase
constructor
A new instance of IconBase.
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) ⇒ IconBase
Returns a new instance of IconBase.
9 10 11 12 13 14 15 16 17 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 9 def initialize(**attribs_, &block) super(type: :icon, **attribs_, &block) @icon = attribs.delete(:icon) @color = attribs.delete(:color) @size = attribs.delete(:size){ :default } @position = Array(attribs.delete(:position)).compact @hidden = attribs.delete(:hidden) {false} end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 7 def color @color end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 7 def hidden @hidden end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 7 def icon @icon end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 7 def position @position end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
7 8 9 |
# File 'lib/voom/presenters/dsl/components/icon_base.rb', line 7 def size @size end |