Class: Logo::Component
- Inherits:
-
Lookbook::BaseComponent
- Object
- Lookbook::BaseComponent
- Logo::Component
- Defined in:
- app/components/lookbook/logo/component.rb
Instance Attribute Summary collapse
-
#stroke ⇒ Object
readonly
Returns the value of attribute stroke.
Instance Method Summary collapse
-
#initialize(size: 4, stroke: 2, **html_attrs) ⇒ Component
constructor
A new instance of Component.
- #size_rems ⇒ Object
Constructor Details
#initialize(size: 4, stroke: 2, **html_attrs) ⇒ Component
Returns a new instance of Component.
5 6 7 8 9 |
# File 'app/components/lookbook/logo/component.rb', line 5 def initialize(size: 4, stroke: 2, **html_attrs) @size = size || 4 @stroke = stroke super(**html_attrs) end |
Instance Attribute Details
#stroke ⇒ Object (readonly)
Returns the value of attribute stroke.
3 4 5 |
# File 'app/components/lookbook/logo/component.rb', line 3 def stroke @stroke end |
Instance Method Details
#size_rems ⇒ Object
11 12 13 |
# File 'app/components/lookbook/logo/component.rb', line 11 def size_rems "#{@size * 0.25}rem" end |