Class: Voom::Presenters::DSL::Components::Menu::Item
- Includes:
- BaseMenuItem, Voom::Presenters::DSL::Components::Mixins::Tooltips, Voom::Presenters::DSL::Components::Mixins::Typography
- Defined in:
- lib/voom/presenters/dsl/components/menu.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#selected ⇒ Object
Returns the value of attribute selected.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes included from BaseMenuItem
Attributes inherited from EventBase
Attributes included from Voom::Presenters::DSL::Components::Mixins::Event
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #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::Typography
#blank, #body, #body2, #caption, #headline, #headline1, #headline2, #headline3, #headline4, #headline5, #headline6, #link, #overline, #page_title, #separator, #subtitle, #subtitle2, #title
Methods included from Voom::Presenters::DSL::Components::Mixins::Append
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 Pluggable
#include_plugins, #plugin, #plugin_module
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.
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 81 def initialize(**attribs_, &block) super(type: :item, **attribs_, &block) @text = attribs.delete(:text) @disabled = attribs.delete(:disabled) @selected = attribs.delete(:selected) {false} @position = validate_position(attribs.delete(:position) { :top }) @size = validate_size(attribs.delete(:size) { :normal }) @color = attribs.delete(:color) { :primary } @components = [] end |
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
79 80 81 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 79 def disabled @disabled end |
#selected ⇒ Object
Returns the value of attribute selected.
79 80 81 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 79 def selected @selected end |
#text ⇒ Object
Returns the value of attribute text.
79 80 81 |
# File 'lib/voom/presenters/dsl/components/menu.rb', line 79 def text @text end |