Class: Avo::ProfileItemComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/avo/profile_item_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#activeObject (readonly)

Returns the value of attribute active.



7
8
9
# File 'app/components/avo/profile_item_component.rb', line 7

def active
  @active
end

#iconObject (readonly)

Returns the value of attribute icon.



5
6
7
# File 'app/components/avo/profile_item_component.rb', line 5

def icon
  @icon
end

#labelObject (readonly)

Returns the value of attribute label.



4
5
6
# File 'app/components/avo/profile_item_component.rb', line 4

def label
  @label
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'app/components/avo/profile_item_component.rb', line 6

def path
  @path
end

#targetObject (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

#titleObject



19
20
21
# File 'app/components/avo/profile_item_component.rb', line 19

def title
  @title || @label
end