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.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#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) ⇒ ProfileItemComponent
constructor
A new instance of ProfileItemComponent.
- #title ⇒ Object
Constructor Details
#initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil) ⇒ ProfileItemComponent
Returns a new instance of ProfileItemComponent.
10 11 12 13 14 15 16 17 |
# File 'app/components/avo/profile_item_component.rb', line 10 def initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil) @label = label @icon = icon @path = path @active = active @target = target @title = title 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 |
#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 |
#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
19 20 21 |
# File 'app/components/avo/profile_item_component.rb', line 19 def title @title || @label end |