Method: Icon::Component#initialize
- Defined in:
- app/components/lookbook/icon/component.rb
#initialize(name:, size: 4, stroke: 2, **html_attrs) ⇒ Component
Returns a new instance of Component.
7 8 9 10 11 12 |
# File 'app/components/lookbook/icon/component.rb', line 7 def initialize(name:, size: 4, stroke: 2, **html_attrs) @icon_name = name.to_s.tr("_", "-") @size = size || 4 @stroke = stroke super(**html_attrs) end |