Method: Anchor::Component#initialize
- Defined in:
- app/components/anchor/component.rb
#initialize(**kwargs) ⇒ Component
Returns a new instance of Component.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/components/anchor/component.rb', line 10 def initialize(**kwargs) classes = add_variant_classes_if_available( classes: [*kwargs.delete(:classes), *kwargs.delete(:class)], variant: kwargs.delete(:variant) ) = kwargs .merge(class: classes) .reject { |_, v| deep_blank?(v) } super # rubocop:disable Style/AvoidImplicitSuper end |