Class: JsonFields::BaseStructure
- Inherits:
-
Object
- Object
- JsonFields::BaseStructure
- Includes:
- ActionView::Context, ActionView::Helpers::FormTagHelper, ActionView::Helpers::TagHelper
- Defined in:
- lib/json_fields/base_structure.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#allow_blank ⇒ Object
Returns the value of attribute allow_blank.
Instance Method Summary collapse
- #assemble(values) ⇒ Object
-
#initialize(options) ⇒ BaseStructure
constructor
A new instance of BaseStructure.
- #template(object_name, method, options) ⇒ Object
Constructor Details
#initialize(options) ⇒ BaseStructure
Returns a new instance of BaseStructure.
9 10 11 |
# File 'lib/json_fields/base_structure.rb', line 9 def initialize() @allow_blank = [:allow_blank] || false end |
Instance Attribute Details
#allow_blank ⇒ Object
Returns the value of attribute allow_blank.
7 8 9 |
# File 'lib/json_fields/base_structure.rb', line 7 def allow_blank @allow_blank end |
Instance Method Details
#assemble(values) ⇒ Object
17 18 19 |
# File 'lib/json_fields/base_structure.rb', line 17 def assemble(values) raise "assemble must be defined in the subclass" end |
#template(object_name, method, options) ⇒ Object
13 14 15 |
# File 'lib/json_fields/base_structure.rb', line 13 def template(object_name, method, ) raise "template must be defined in the subclass" end |