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