Class: Valkyrie::Persistence::Solr::ORMConverter::NestedResourceID

Inherits:
ValueMapper
  • Object
show all
Defined in:
lib/valkyrie/persistence/solr/orm_converter.rb

Instance Attribute Summary

Attributes inherited from ValueMapper

#calling_mapper, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ValueMapper

for, #initialize, register

Constructor Details

This class inherits a constructor from Valkyrie::ValueMapper

Class Method Details

.handles?(value) ⇒ Boolean

Returns:

  • (Boolean)


189
190
191
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 189

def self.handles?(value)
  value.is_a?(Hash) && value[:id] && !value[:internal_resource]
end

Instance Method Details

#resultObject



193
194
195
# File 'lib/valkyrie/persistence/solr/orm_converter.rb', line 193

def result
  Valkyrie::ID.new(value[:id])
end