Class: Practical::Views::Form::RequiredRadioCollectionWrapperComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Practical::Views::Form::RequiredRadioCollectionWrapperComponent
- Defined in:
- app/components/practical/views/form/required_radio_collection_wrapper_component.rb
Instance Attribute Summary collapse
-
#f ⇒ Object
readonly
Returns the value of attribute f.
-
#object_method ⇒ Object
readonly
Returns the value of attribute object_method.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
- #finalized_options ⇒ Object
-
#initialize(f:, object_method:, options:) ⇒ RequiredRadioCollectionWrapperComponent
constructor
A new instance of RequiredRadioCollectionWrapperComponent.
Constructor Details
#initialize(f:, object_method:, options:) ⇒ RequiredRadioCollectionWrapperComponent
Returns a new instance of RequiredRadioCollectionWrapperComponent.
5 6 7 8 9 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 5 def initialize(f:, object_method:, options:) @f = f @object_method = object_method @options = end |
Instance Attribute Details
#f ⇒ Object (readonly)
Returns the value of attribute f.
4 5 6 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 4 def f @f end |
#object_method ⇒ Object (readonly)
Returns the value of attribute object_method.
4 5 6 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 4 def object_method @object_method end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 4 def @options end |
Instance Method Details
#call ⇒ Object
20 21 22 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 20 def call content_tag(:"required-radio-collection", content, **) end |
#finalized_options ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/components/practical/views/form/required_radio_collection_wrapper_component.rb', line 11 def mix({ "fieldset": f.field_id(object_method), "field-name": f.field_name(object_method), "errors-element": f.field_id(object_method, :errors), "errors-element-aria": f.field_id(object_method, :errors_aria), }, ) end |