Class: Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::UpdatedAtValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::UpdatedAtValue
- Defined in:
- lib/valkyrie/persistence/fedora/persister/orm_converter.rb
Overview
Casts the value of the RDF statements encoding the time of last update creation for the Valkyrie Resource into a DateTime value
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not the Property RDF statement encodes an update date.
Instance Method Summary collapse
-
#result ⇒ NonStringSingleApplicator
Constructs a NonStringSingleApplicator object for mapping the time at which the resource was last updated.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
Determines whether or not the Property RDF statement encodes an update date
488 489 490 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 488 def self.handles?(value) value.statement.predicate == value.adapter.schema.predicate_for(property: :updated_at, resource: nil) end |
Instance Method Details
#result ⇒ NonStringSingleApplicator
Constructs a NonStringSingleApplicator object for mapping the time at which the resource was last updated
494 495 496 |
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 494 def result NonStringSingleApplicator.new(value) end |