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