Class: Impulse::SelectComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/impulse/select_component.rb

Defined Under Namespace

Classes: OptionStruct

Instance Method Summary collapse

Methods inherited from ApplicationComponent

generate_id

Methods included from Helpers::AttributesHelper

#merge_attributes

Constructor Details

#initialize(object_name, method_name, choices = [], selected: nil, **system_args) ⇒ SelectComponent

Returns a new instance of SelectComponent.



8
9
10
11
12
13
14
# File 'app/components/impulse/select_component.rb', line 8

def initialize(object_name, method_name, choices = [], selected: nil, **system_args)
  @object_name = object_name
  @method_name = method_name
  @choices = choices
  @selected = selected
  @system_args = system_args
end