Class: FoxTail::IconBaseComponent

Inherits:
InlineSvgComponent show all
Defined in:
app/components/fox_tail/icon_base_component.rb

Direct Known Subclasses

IconComponent

Instance Attribute Summary collapse

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from InlineSvgComponent

#call

Methods inherited from BaseComponent

classname_merger, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

#initialize(name, html_attributes = {}) ⇒ IconBaseComponent

Returns a new instance of IconBaseComponent.



8
9
10
11
# File 'app/components/fox_tail/icon_base_component.rb', line 8

def initialize(name, html_attributes = {})
  @name = name.to_s.gsub("_", "-")
  super nil, html_attributes
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'app/components/fox_tail/icon_base_component.rb', line 4

def name
  @name
end

Instance Method Details

#pathObject



13
14
15
# File 'app/components/fox_tail/icon_base_component.rb', line 13

def path
  icon_fullpath
end