Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::InternalModelValue

Inherits:
ValueMapper
  • Object
show all
Defined in:
lib/valkyrie/persistence/fedora/persister/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)


255
256
257
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 255

def self.handles?(value)
  value.statement.predicate == value.adapter.schema.predicate_for(property: :internal_resource, resource: nil)
end

Instance Method Details

#resultObject



259
260
261
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 259

def result
  SingleApplicator.new(value)
end