Class: StompBase::Settings::FieldComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- StompBase::Settings::FieldComponent
- Defined in:
- app/components/stomp_base/settings/field_component.rb
Instance Method Summary collapse
-
#initialize(field_config:, form_data:) ⇒ FieldComponent
constructor
A new instance of FieldComponent.
Methods inherited from BaseComponent
Constructor Details
#initialize(field_config:, form_data:) ⇒ FieldComponent
Returns a new instance of FieldComponent.
6 7 8 9 10 11 12 13 14 15 |
# File 'app/components/stomp_base/settings/field_component.rb', line 6 def initialize(field_config:, form_data:) super() @icon_path = field_config[:icon_path] @label = field_config[:label] @description = field_config[:description] @field_name = field_config[:field_name] @options = field_config[:options] @current_value = form_data[:current_value] @form = form_data[:form] end |