Class: Valkyrie::Persistence::Solr::ORMConverter::NestedResourceID
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ORMConverter::NestedResourceID
- Defined in:
- lib/valkyrie/persistence/solr/orm_converter.rb
Overview
Class for handling serialized Hashes for Valkyrie IDs in Solr fields
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not an Object is a Property.
Instance Method Summary collapse
-
#result ⇒ Valkyrie::ID
Constructs a Valkyrie::ID object using the value keyed to :id in the Property Hash value.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
Determines whether or not an Object is a Property
315 316 317 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 315 def self.handles?(value) value.is_a?(Hash) && value[:id] && !value[:internal_resource] end |
Instance Method Details
#result ⇒ Valkyrie::ID
Constructs a Valkyrie::ID object using the value keyed to :id in the Property Hash value
321 322 323 |
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 321 def result Valkyrie::ID.new(value[:id]) end |