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.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
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
#ct, #i18n_scope, #original_i18n_scope, #original_virtual_path
Constructor Details
#initialize(name, *args, &block) ⇒ Component
8 9 10 11 12 13 14 15 16 |
# File 'app/components/satis/tab/component.rb', line 8 def initialize(name, *args, &block) super @name = name = args. @args = args @icon = [:icon] @badge = [:badge] @block = block 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 |
#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 end |
Instance Method Details
#call ⇒ Object
30 31 32 |
# File 'app/components/satis/tab/component.rb', line 30 def call content end |
#responsive? ⇒ Boolean
18 19 20 |
# File 'app/components/satis/tab/component.rb', line 18 def responsive? [:responsive] == true end |
#selected? ⇒ Boolean
22 23 24 |
# File 'app/components/satis/tab/component.rb', line 22 def selected? [:selected] == true end |
#title ⇒ Object
26 27 28 |
# File 'app/components/satis/tab/component.rb', line 26 def title [:title] end |