Class: Valkyrie::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/valkyrie.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ Config

Returns a new instance of Config.



78
79
80
# File 'lib/valkyrie.rb', line 78

def initialize(hsh = {})
  super(defaults.merge(hsh))
end

Instance Attribute Details

#id_string_equality==(value) ⇒ Object (writeonly)

The setter for #id_string_equality; see it’s implementation



# File 'lib/valkyrie.rb', line 100

Instance Method Details

#id_string_equalityBoolean

Configure id_string_equality to be true in order to make Valkyrie::ID equal to the string value they contain. This will be the default behavior in v3.0.0.

Returns:

  • (Boolean)

    Whether ‘Valkyrie::ID` should be equal to their string counterpart.



96
97
98
# File 'lib/valkyrie.rb', line 96

def id_string_equality
  super
end

#metadata_adapterObject



82
83
84
# File 'lib/valkyrie.rb', line 82

def 
  Valkyrie::MetadataAdapter.find(super.to_sym)
end

#resource_class_resolver#call

The returned anonymous method (e.g. responds to #call) has a signature of an unamed parameter that is a string. Calling the anonymous method should return a Valkyrie::Resource from which Valkyrie will map the persisted data into.

Returns:

  • (#call)

    with method signature of 1

See Also:

  • for full interface


113
114
115
# File 'lib/valkyrie.rb', line 113

def resource_class_resolver
  super
end

#storage_adapterObject



86
87
88
# File 'lib/valkyrie.rb', line 86

def storage_adapter
  Valkyrie::StorageAdapter.find(super.to_sym)
end