class ActiveFedora::LoadableFromJson::SolrBackedMetadataFile
Attributes
uri[W]
Public Class Methods
new()
click to toggle source
# File lib/active_fedora/loadable_from_json.rb, line 10 def initialize @hash = {} end
Public Instance Methods
freeze()
click to toggle source
# File lib/active_fedora/loadable_from_json.rb, line 6 def freeze @hash.freeze end
term_values(*terminology)
click to toggle source
# File lib/active_fedora/loadable_from_json.rb, line 14 def term_values(*terminology) @hash.fetch(terminology.first, []) end
update_indexed_attributes(hash)
click to toggle source
It is expected that the singular filter gets applied after fetching the value from this resource, so cast everything back to an array.
# File lib/active_fedora/loadable_from_json.rb, line 20 def update_indexed_attributes(hash) hash.each do |k, v| @hash[k.first] = Array(v) end end