Class: Hyrax::FormFields Private
- Inherits:
-
Module
- Object
- Module
- Hyrax::FormFields
- Defined in:
- lib/hyrax/form_fields.rb
Overview
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
- #contexts ⇒ Object readonly private
- #name ⇒ Object readonly private
- #version ⇒ Object readonly private
Instance Method Summary collapse
- #form_field_definitions ⇒ Hash{Symbol => Hash{Symbol => Object}} private
-
#initialize(schema_name, definition_loader: SimpleSchemaLoader.new, version: 1, contexts: nil) ⇒ FormFields
constructor
private
A new instance of FormFields.
- #inspect ⇒ String private
Constructor Details
#initialize(schema_name, definition_loader: SimpleSchemaLoader.new, version: 1, contexts: nil) ⇒ FormFields
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.
use Hyrax::FormFields(:my_schema) instead
Returns a new instance of FormFields.
28 29 30 31 32 33 |
# File 'lib/hyrax/form_fields.rb', line 28 def initialize(schema_name, definition_loader: SimpleSchemaLoader.new, version: 1, contexts: nil) @contexts = contexts @definition_loader = definition_loader @name = schema_name @version = version end |
Instance Attribute Details
#contexts ⇒ 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.
19 20 21 |
# File 'lib/hyrax/form_fields.rb', line 19 def contexts @contexts end |
#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.
19 20 21 |
# File 'lib/hyrax/form_fields.rb', line 19 def name @name end |
#version ⇒ 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.
19 20 21 |
# File 'lib/hyrax/form_fields.rb', line 19 def version @version end |
Instance Method Details
#form_field_definitions ⇒ Hash{Symbol => Hash{Symbol => 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.
37 38 39 |
# File 'lib/hyrax/form_fields.rb', line 37 def form_field_definitions @definition_loader.form_definitions_for(schema: name, version:, contexts:) end |
#inspect ⇒ String
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.
43 44 45 |
# File 'lib/hyrax/form_fields.rb', line 43 def inspect "#{self.class}(#{@name})" end |