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, 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

#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

#classesObject (readonly)

Returns the value of attribute classes.



11
12
13
# File 'app/components/avo/profile_item_component.rb', line 11

def classes
  @classes
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

#methodObject (readonly)

Returns the value of attribute method.



9
10
11
# File 'app/components/avo/profile_item_component.rb', line 9

def method
  @method
end

#paramsObject (readonly)

Returns the value of attribute params.



10
11
12
# File 'app/components/avo/profile_item_component.rb', line 10

def params
  @params
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



25
26
27
# File 'app/components/avo/profile_item_component.rb', line 25

def title
  @title || @label
end