Class: Bs5::Tabs::ItemComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Bs5::Tabs::ItemComponent
- Defined in:
- app/components/bs5/tabs/item_component.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#style ⇒ Object
Returns the value of attribute style.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, options = {}) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
- #pane_id ⇒ Object
- #tab_id ⇒ Object
Constructor Details
#initialize(title, options = {}) ⇒ ItemComponent
Returns a new instance of ItemComponent.
9 10 11 12 13 |
# File 'app/components/bs5/tabs/item_component.rb', line 9 def initialize(title, = {}) @title = title @options = .symbolize_keys end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'app/components/bs5/tabs/item_component.rb', line 6 def @options end |
#style ⇒ Object
Returns the value of attribute style.
7 8 9 |
# File 'app/components/bs5/tabs/item_component.rb', line 7 def style @style end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'app/components/bs5/tabs/item_component.rb', line 6 def title @title end |
Instance Method Details
#pane_id ⇒ Object
19 20 21 |
# File 'app/components/bs5/tabs/item_component.rb', line 19 def pane_id "nav-#{object_id}" end |
#tab_id ⇒ Object
15 16 17 |
# File 'app/components/bs5/tabs/item_component.rb', line 15 def tab_id "nav-#{object_id}-tab" end |