Class: Satis::Tab::Component
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Satis::Tab::Component
- Defined in:
- app/components/satis/tab/component.rb
Instance Attribute Summary collapse
-
#badge ⇒ Object
readonly
Returns the value of attribute badge.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#selected_tab_index ⇒ Object
readonly
Returns the value of attribute selected_tab_index.
-
#tab_menu ⇒ Object
readonly
Returns the value of attribute tab_menu.
Attributes inherited from ApplicationComponent
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name, *args, &block) ⇒ Component
constructor
A new instance of Component.
- #responsive? ⇒ Boolean
- #selected? ⇒ Boolean
- #title ⇒ Object
Methods inherited from ApplicationComponent
add_helper, #component_name, #ct, #i18n_scope, #original_i18n_scope, #original_virtual_path
Constructor Details
#initialize(name, *args, &block) ⇒ Component
Returns a new instance of Component.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/components/satis/tab/component.rb', line 8 def initialize(name, *args, &block) super @name = name @options = args. @args = args @icon = [:icon] @id = [:id] @badge = [:badge] @tab_menu = [:tab_menu] @block = block @selected_tab_index = [:selected_tab_index] end |
Instance Attribute Details
#badge ⇒ Object (readonly)
Returns the value of attribute badge.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def badge @badge end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def icon @icon end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def @options end |
#selected_tab_index ⇒ Object (readonly)
Returns the value of attribute selected_tab_index.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def selected_tab_index @selected_tab_index end |
#tab_menu ⇒ Object (readonly)
Returns the value of attribute tab_menu.
6 7 8 |
# File 'app/components/satis/tab/component.rb', line 6 def @tab_menu end |
Instance Method Details
#call ⇒ Object
33 34 35 |
# File 'app/components/satis/tab/component.rb', line 33 def call content end |
#responsive? ⇒ Boolean
21 22 23 |
# File 'app/components/satis/tab/component.rb', line 21 def responsive? [:responsive] == true end |
#selected? ⇒ Boolean
25 26 27 |
# File 'app/components/satis/tab/component.rb', line 25 def selected? [:selected] == true end |
#title ⇒ Object
29 30 31 |
# File 'app/components/satis/tab/component.rb', line 29 def title [:title] end |