Method: FoxTail::FAB::ItemComponent#initialize
- Defined in:
- app/components/fox_tail/f_a_b/item_component.rb
#initialize(icon_or_attributes = {}, html_attributes = {}) ⇒ ItemComponent
Returns a new instance of ItemComponent.
10 11 12 13 14 15 16 17 18 |
# File 'app/components/fox_tail/f_a_b/item_component.rb', line 10 def initialize(icon_or_attributes = {}, html_attributes = {}) if icon_or_attributes.is_a? Hash icon_or_attributes.reverse_merge! DEFAULT_OPTIONS else html_attributes.reverse_merge! DEFAULT_OPTIONS end super end |