Class: Shimmer::Form::Field
- Inherits:
-
Object
- Object
- Shimmer::Form::Field
- Defined in:
- lib/shimmer/form/field.rb
Direct Known Subclasses
CheckboxField, CheckboxesField, DateField, DatetimeField, EmailField, ImageField, NumberField, PasswordField, PdfField, RadioField, RadiosField, SelectField, TextAreaField, TextField, TimeField
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#id_method ⇒ Object
readonly
Returns the value of attribute id_method.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#name_method ⇒ Object
readonly
Returns the value of attribute name_method.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(builder:, method:, collection:, id_method:, name_method:, options: {}) ⇒ Field
constructor
A new instance of Field.
- #prepare ⇒ Object
- #wrapper_options ⇒ Object
Constructor Details
#initialize(builder:, method:, collection:, id_method:, name_method:, options: {}) ⇒ Field
Returns a new instance of Field.
23 24 25 26 27 28 29 30 |
# File 'lib/shimmer/form/field.rb', line 23 def initialize(builder:, method:, collection:, id_method:, name_method:, options: {}) @builder = builder @method = method @collection = collection @id_method = id_method @name_method = name_method @options = end |
Instance Attribute Details
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def builder @builder end |
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def collection @collection end |
#id_method ⇒ Object (readonly)
Returns the value of attribute id_method.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def id_method @id_method end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def method @method end |
#name_method ⇒ Object (readonly)
Returns the value of attribute name_method.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def name_method @name_method end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/shimmer/form/field.rb', line 8 def @options end |
Class Method Details
.can_handle?(method) ⇒ Boolean
11 12 13 |
# File 'lib/shimmer/form/field.rb', line 11 def can_handle?(method) false end |
Instance Method Details
#prepare ⇒ Object
20 21 |
# File 'lib/shimmer/form/field.rb', line 20 def prepare end |
#wrapper_options ⇒ Object
16 17 18 |
# File 'lib/shimmer/form/field.rb', line 16 def {} end |