Class: Hyrax::SimpleSchemaLoader Private
- Inherits:
-
SchemaLoader
- Object
- SchemaLoader
- Hyrax::SimpleSchemaLoader
- Defined in:
- app/services/hyrax/simple_schema_loader.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.
This is a simple yaml config-driven schema loader
Instance Method Summary collapse
-
#permissive_schema_for_valkrie_adapter ⇒ Object
private
rubocop:enable Lint/UnusedMethodArgument.
-
#view_definitions_for(schema:, version: 1, contexts: nil) ⇒ Object
private
rubocop:disable Lint/UnusedMethodArgument.
Methods inherited from SchemaLoader
#attributes_for, #current_version, #form_definitions_for, #index_rules_for
Instance Method Details
#permissive_schema_for_valkrie_adapter ⇒ 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.
rubocop:enable Lint/UnusedMethodArgument
18 19 20 21 22 |
# File 'app/services/hyrax/simple_schema_loader.rb', line 18 def permissive_schema_for_valkrie_adapter .each_with_object({}) do |schema_name, ret_hsh| predicate_pairs(ret_hsh, schema_name) end end |
#view_definitions_for(schema:, version: 1, contexts: nil) ⇒ 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.
rubocop:disable Lint/UnusedMethodArgument
11 12 13 14 15 16 |
# File 'app/services/hyrax/simple_schema_loader.rb', line 11 def view_definitions_for(schema:, version: 1, contexts: nil) # rubocop:disable Lint/UnusedMethodArgument schema.each_with_object({}) do |property, | = property.['view'] [property.name.to_s] = .with_indifferent_access unless .nil? end end |