Class: Avo::ProfileItemComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::ProfileItemComponent
- Defined in:
- app/components/avo/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.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/components/avo/profile_item_component.rb', line 13 def initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil, method: nil, params: {}, classes: "") @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.
7 8 9 |
# File 'app/components/avo/profile_item_component.rb', line 7 def active @active end |
#classes ⇒ Object (readonly)
Returns the value of attribute classes.
11 12 13 |
# File 'app/components/avo/profile_item_component.rb', line 11 def classes @classes end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
5 6 7 |
# File 'app/components/avo/profile_item_component.rb', line 5 def icon @icon end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'app/components/avo/profile_item_component.rb', line 4 def label @label end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'app/components/avo/profile_item_component.rb', line 9 def method @method end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
10 11 12 |
# File 'app/components/avo/profile_item_component.rb', line 10 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'app/components/avo/profile_item_component.rb', line 6 def path @path end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'app/components/avo/profile_item_component.rb', line 8 def target @target end |
Instance Method Details
#title ⇒ Object
25 26 27 |
# File 'app/components/avo/profile_item_component.rb', line 25 def title @title || @label end |