Class: Jav::ProfileItemComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Jav::ProfileItemComponent
- Defined in:
- app/components/jav/profile_item_component.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#classes ⇒ Object
readonly
Returns the value of attribute classes.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil, method: nil, params: {}, classes: '') ⇒ ProfileItemComponent
constructor
A new instance of ProfileItemComponent.
- #title ⇒ Object
Constructor Details
#initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil, method: nil, params: {}, classes: '') ⇒ ProfileItemComponent
Returns a new instance of ProfileItemComponent.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/components/jav/profile_item_component.rb', line 6 def initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil, method: nil, params: {}, classes: '') super @label = label @icon = icon @path = path @active = active @target = target @title = title @method = method @params = params @classes = classes end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def active @active end |
#classes ⇒ Object (readonly)
Returns the value of attribute classes.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def classes @classes end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def icon @icon end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def label @label end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def method @method end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def path @path end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
4 5 6 |
# File 'app/components/jav/profile_item_component.rb', line 4 def target @target end |
Instance Method Details
#title ⇒ Object
20 21 22 |
# File 'app/components/jav/profile_item_component.rb', line 20 def title @title || @label end |