Class: Phlexi::Form::Components::Base
- Defined in:
- lib/phlexi/form/components/base.rb
Direct Known Subclasses
CollectionCheckboxes, CollectionRadioButtons, Error, FullError, Hint, Input, InputArray, Label, Select, SubmitButton, Textarea, Wrapper
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field, **attributes) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(field, **attributes) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 |
# File 'lib/phlexi/form/components/base.rb', line 9 def initialize(field, **attributes) @field = field @attributes = attributes build_attributes append_attribute_classes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/phlexi/form/components/base.rb', line 7 def attributes @attributes end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
7 8 9 |
# File 'lib/phlexi/form/components/base.rb', line 7 def field @field end |