Class: TaoForm::Components::FieldComponent
- Inherits:
-
TaoOnRails::Components::Base
- Object
- TaoOnRails::Components::Base
- TaoForm::Components::FieldComponent
- Defined in:
- lib/tao_form/components/field_component.rb
Direct Known Subclasses
CheckBoxComponent, DateRangePickerComponent, DatetimePickerComponent, MomentPicker::Base, MomentPicker::ResultComponent, RadioButtonComponent, Select::MultipleResultComponent, Select::ResultComponent, SelectComponent
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
-
#initialize(view, builder = nil, attribute_name = nil, options = {}) ⇒ FieldComponent
constructor
A new instance of FieldComponent.
Constructor Details
#initialize(view, builder = nil, attribute_name = nil, options = {}) ⇒ FieldComponent
Returns a new instance of FieldComponent.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tao_form/components/field_component.rb', line 7 def initialize view, builder = nil, attribute_name = nil, = {} if builder.is_a? Hash = builder builder = nil attribute_name = nil end super view, @builder = builder @attribute_name = attribute_name end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
5 6 7 |
# File 'lib/tao_form/components/field_component.rb', line 5 def attribute_name @attribute_name end |
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
5 6 7 |
# File 'lib/tao_form/components/field_component.rb', line 5 def builder @builder end |