Class: Voom::Presenters::DSL::Components::TabBar::Tab

Inherits:
EventBase
  • Object
show all
Includes:
Mixins::Common
Defined in:
lib/voom/presenters/dsl/components/tab_bar.rb

Instance Attribute Summary collapse

Attributes inherited from EventBase

#event_parent_id

Attributes included from Mixins::Event

#events

Attributes inherited from Base

#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type

Instance Method Summary collapse

Methods included from Mixins::Common

#avatar, #badge, #card, #form, #list, #table, #unordered_list

Methods included from Mixins::Tables

#table

Methods included from Mixins::Dialogs

#dialog

Methods included from Mixins::ImageLists

#image_list

Methods included from Mixins::Images

#image

Methods included from Mixins::TabBars

#tab_bar

Methods included from Mixins::Menus

#menu

Methods included from Mixins::Content

#content

Methods included from Mixins::ExpansionPanels

#expansion_panel

Methods included from Mixins::Buttons

#button

Methods included from Mixins::Grids

#grid

Methods included from Mixins::Typography

#blank, #body, #body2, #caption, #headline, #headline1, #headline2, #headline3, #headline4, #headline5, #headline6, #link, #overline, #page_title, #separator, #subtitle, #subtitle2, #text, #title

Methods included from Mixins::Append

#<<, #yield_to

Methods included from Mixins::Toggles

#checkbox, #icon_toggle, #radio_button, #switch

Methods included from Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Pluggable

#include_plugins, #plugin, #plugin_module

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ Tab

Returns a new instance of Tab.



23
24
25
26
27
28
29
30
31
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 23

def initialize(**attribs_, &block)
  super(type: :tab, **attribs_, &block)
  @label = attribs.delete(:label){nil}
  @icon = attribs.delete(:icon) {nil}
  @stacked = attribs.delete(:stacked) {false}
  @selected = attribs.delete(:selected) {false}
  @components = []
  expand!
end

Instance Attribute Details

#componentsObject

Returns the value of attribute components.



21
22
23
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 21

def components
  @components
end

#icon(icon = nil, **attribs, &block) ⇒ Object

Returns the value of attribute icon.



21
22
23
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 21

def icon
  @icon
end

#label(text = nil) ⇒ Object

Returns the value of attribute label.



21
22
23
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 21

def label
  @label
end

#selectedObject

Returns the value of attribute selected.



21
22
23
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 21

def selected
  @selected
end

#stackedObject

Returns the value of attribute stacked.



21
22
23
# File 'lib/voom/presenters/dsl/components/tab_bar.rb', line 21

def stacked
  @stacked
end