Class: Valkyrie::Config
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Valkyrie::Config
- Defined in:
- lib/valkyrie.rb
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ Config
constructor
A new instance of Config.
- #metadata_adapter ⇒ Object
-
#resource_class_resolver ⇒ #call
The returned anonymous method (e.g. responds to #call) has a signature of an unamed parameter that is a string.
- #storage_adapter ⇒ Object
Constructor Details
#initialize(hsh = {}) ⇒ Config
Returns a new instance of Config.
80 81 82 |
# File 'lib/valkyrie.rb', line 80 def initialize(hsh = {}) super(defaults.merge(hsh)) end |
Instance Method Details
#metadata_adapter ⇒ Object
84 85 86 |
# File 'lib/valkyrie.rb', line 84 def Valkyrie::MetadataAdapter.find(super.to_sym) end |
#resource_class_resolver ⇒ #call
The returned anonymous method (e.g. responds to #call) has a signature of an unamed parameter that is a string. Calling the anonymous method should return a Valkyrie::Resource from which Valkyrie will map the persisted data into.
102 103 104 |
# File 'lib/valkyrie.rb', line 102 def resource_class_resolver super end |
#storage_adapter ⇒ Object
88 89 90 |
# File 'lib/valkyrie.rb', line 88 def storage_adapter Valkyrie::StorageAdapter.find(super.to_sym) end |