Class: PresentationDataEditor
- Inherits:
-
Object
- Object
- PresentationDataEditor
- Defined in:
- lib/components/presentation_data_editor.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(view_context, data, schema, form) ⇒ PresentationDataEditor
constructor
Expects a hash schema definition.
- #render ⇒ Object
Constructor Details
#initialize(view_context, data, schema, form) ⇒ PresentationDataEditor
Expects a hash schema definition.
will probably come from presentation_data_template.schema
9 10 11 12 13 14 |
# File 'lib/components/presentation_data_editor.rb', line 9 def initialize(view_context, data, schema, form) @view = view_context @data = data @schema = schema @form = form end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/components/presentation_data_editor.rb', line 3 def data @data end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
5 6 7 |
# File 'lib/components/presentation_data_editor.rb', line 5 def form @form end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
4 5 6 |
# File 'lib/components/presentation_data_editor.rb', line 4 def schema @schema end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
2 3 4 |
# File 'lib/components/presentation_data_editor.rb', line 2 def view @view end |
Instance Method Details
#render ⇒ Object
16 17 18 |
# File 'lib/components/presentation_data_editor.rb', line 16 def render presentation_data_editor if schema.is_a? Array end |