Class: Logo::Component

Inherits:
Lookbook::BaseComponent
  • Object
show all
Defined in:
app/components/lookbook/logo/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#strokeObject (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_remsObject



11
12
13
# File 'app/components/lookbook/logo/component.rb', line 11

def size_rems
  "#{@size * 0.25}rem"
end