Class: Faalis::Dashboard::Helpers::BoxHelpers::Tabs
- Inherits:
-
Object
- Object
- Faalis::Dashboard::Helpers::BoxHelpers::Tabs
- Defined in:
- lib/faalis/dashboard/helpers/box_helpers.rb
Defined Under Namespace
Classes: Tab
Instance Attribute Summary collapse
-
#title_icon ⇒ Object
readonly
Returns the value of attribute title_icon.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Tabs
constructor
A new instance of Tabs.
- #tab(title, **options, &block) ⇒ Object
- #tabs ⇒ Object
Constructor Details
#initialize(**options) ⇒ Tabs
Returns a new instance of Tabs.
44 45 46 47 |
# File 'lib/faalis/dashboard/helpers/box_helpers.rb', line 44 def initialize(**) @tabs = [] @title_icon = [:title_icon] end |
Instance Attribute Details
#title_icon ⇒ Object (readonly)
Returns the value of attribute title_icon.
42 43 44 |
# File 'lib/faalis/dashboard/helpers/box_helpers.rb', line 42 def title_icon @title_icon end |
Instance Method Details
#tab(title, **options, &block) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/faalis/dashboard/helpers/box_helpers.rb', line 50 def tab(title, **, &block) id = @tabs.length tab = Tab.new(title, **) tab.content = block tab.id = id @tabs << tab end |
#tabs ⇒ Object
58 59 60 |
# File 'lib/faalis/dashboard/helpers/box_helpers.rb', line 58 def tabs @tabs end |