Class: Kanso::FormFieldComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Kanso::FormFieldComponent
- Defined in:
- app/components/kanso/form_field_component.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(form:, attribute:, type: :text_field, **options) ⇒ FormFieldComponent
constructor
A new instance of FormFieldComponent.
Constructor Details
#initialize(form:, attribute:, type: :text_field, **options) ⇒ FormFieldComponent
Returns a new instance of FormFieldComponent.
9 10 11 12 13 14 |
# File 'app/components/kanso/form_field_component.rb', line 9 def initialize(form:, attribute:, type: :text_field, **) @form = form @attribute = attribute @type = type @options = end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
7 8 9 |
# File 'app/components/kanso/form_field_component.rb', line 7 def attribute @attribute end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
7 8 9 |
# File 'app/components/kanso/form_field_component.rb', line 7 def form @form end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'app/components/kanso/form_field_component.rb', line 7 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'app/components/kanso/form_field_component.rb', line 7 def type @type end |