Method: FoxTail::BaseComponent#initialize

Defined in:
app/components/fox_tail/base_component.rb

#initialize(html_attributes = {}) ⇒ BaseComponent

Returns a new instance of BaseComponent.



13
14
15
16
17
18
19
20
21
# File 'app/components/fox_tail/base_component.rb', line 13

def initialize(html_attributes = {})
  super

  html_attributes = ActiveSupport::HashWithIndifferentAccess.new html_attributes
  theme = html_attributes.delete :theme
  self.theme.merge! theme if theme.present?
  extract_options! html_attributes
  @html_attributes = html_attributes
end