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

Inherits:
Applicator
  • Object
show all
Defined in:
lib/valkyrie/persistence/fedora/persister/orm_converter.rb

Overview

Class for mapping single values other than Strings

Instance Attribute Summary

Attributes inherited from Applicator

#property

Instance Method Summary collapse

Methods inherited from Applicator

#cast_array, #deny?, #denylist, #initialize, #key, #namespaces, #values

Constructor Details

This class inherits a constructor from Valkyrie::Persistence::Fedora::Persister::OrmConverter::GraphToAttributes::Applicator

Instance Method Details

#apply_to(hsh) ⇒ Hash

For the trivial case, insert the value into the attribute Hash

Parameters:

  • hsh (Hash)

    a new or existing Hash of attribute for Valkyrie resource attributes

Returns:

  • (Hash)


602
603
604
# File 'lib/valkyrie/persistence/fedora/persister/orm_converter.rb', line 602

def apply_to(hsh)
  hsh[key.to_sym] = values
end