Class: Voom::Presenters::DSL::Components::Menu::Item
- Defined in:
- lib/voom/presenters/dsl/components/menu.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from EventBase
Attributes included from Voom::Presenters::DSL::Components::Mixins::Event
Attributes inherited from Base
#attributes, #context, #id, #type
Instance Method Summary collapse
- #icon(icon = nil, **attribs, &block) ⇒ Object
-
#initialize(**attribs_, &block) ⇒ Item
constructor
A new instance of Item.
Methods included from Voom::Presenters::DSL::Components::Mixins::Tooltips
Methods included from Voom::Presenters::DSL::Components::Mixins::Event
Methods inherited from Base
Methods included from Voom::Presenters::DSL::Components::Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Item
Returns a new instance of Item.
41 42 43 44 45 46 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 41 def initialize(**attribs_, &block) super(type: :item, **attribs_, &block) @text = attribs.delete(:text) @disabled = attribs.delete(:disabled) end |
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
39 40 41 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 39 def disabled @disabled end |
#text ⇒ Object
Returns the value of attribute text.
39 40 41 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 39 def text @text end |