Class: FoxTail::IconBaseComponent
- Inherits:
-
InlineSvgComponent
- Object
- ViewComponent::Base
- Base
- BaseComponent
- InlineSvgComponent
- FoxTail::IconBaseComponent
- Defined in:
- app/components/fox_tail/icon_base_component.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from BaseComponent
Instance Method Summary collapse
-
#initialize(name, html_attributes = {}) ⇒ IconBaseComponent
constructor
A new instance of IconBaseComponent.
- #path ⇒ Object
Methods inherited from InlineSvgComponent
Methods inherited from BaseComponent
classname_merger, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
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
#name ⇒ Object (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
#path ⇒ Object
13 14 15 |
# File 'app/components/fox_tail/icon_base_component.rb', line 13 def path icon_fullpath end |