Method: Primer::Forms::PrimerBaseComponentWrapper#initialize
- Defined in:
- app/lib/primer/forms/primer_base_component_wrapper.rb
permalink #initialize(**system_arguments) ⇒ PrimerBaseComponentWrapper
Returns a new instance of PrimerBaseComponentWrapper.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/lib/primer/forms/primer_base_component_wrapper.rb', line 9 def initialize(**system_arguments) @system_arguments = system_arguments # Extract class and classes so they can be passed to Primer::BaseComponent # as classes:. The class: argument is expected by Rails, but Primer expects # classes:, reminiscent of HashWithIndifferentAccess shenanigans. @classes = class_names( system_arguments.delete(:classes), system_arguments.delete(:class) ) end |