Class: FormProps::Inputs::Base
- Inherits:
-
ActionView::Helpers::Tags::Base
- Object
- ActionView::Helpers::Tags::Base
- FormProps::Inputs::Base
- Defined in:
- lib/form_props/inputs/base.rb
Direct Known Subclasses
CheckBox, CollectionCheckBoxes, CollectionRadioButtons, CollectionSelect, GroupedCollectionSelect, RadioButton, Select, Submit, TextArea, TextField, TimeZoneSelect, WeekdaySelect
Instance Method Summary collapse
-
#initialize(object_name, method_name, template_object, options = {}) ⇒ Base
constructor
A new instance of Base.
- #json ⇒ Object
Constructor Details
#initialize(object_name, method_name, template_object, options = {}) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 22 23 |
# File 'lib/form_props/inputs/base.rb', line 16 def initialize(object_name, method_name, template_object, = {}) = .with_indifferent_access @controlled = .delete(:controlled) @key = .delete(:key) super end |
Instance Method Details
#json ⇒ Object
12 13 14 |
# File 'lib/form_props/inputs/base.rb', line 12 def json @json ||= @template_object.instance_variable_get(:@__json) end |