Class: Pageflow::Admin::FormInput Private
- Inherits:
-
Object
- Object
- Pageflow::Admin::FormInput
- Defined in:
- lib/pageflow/admin/form_input.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #attribute_name ⇒ Object readonly private
Instance Method Summary collapse
- #build(form_builder) ⇒ Object private
-
#initialize(attribute_name, options) ⇒ FormInput
constructor
private
A new instance of FormInput.
Constructor Details
#initialize(attribute_name, options) ⇒ FormInput
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FormInput.
7 8 9 10 |
# File 'lib/pageflow/admin/form_input.rb', line 7 def initialize(attribute_name, ) @attribute_name = attribute_name @options = end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'lib/pageflow/admin/form_input.rb', line 5 def attribute_name @attribute_name end |
Instance Method Details
#build(form_builder) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 |
# File 'lib/pageflow/admin/form_input.rb', line 12 def build(form_builder) = @options.respond_to?(:call) ? @options.call : @options form_builder.input(attribute_name, ) end |