Class: ActiveFedora::Indexing::Map

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/active_fedora/indexing/map.rb

Overview

This is a description of how properties should map to indexing strategies

e.g. 'creator_name' => <IndexObject behaviors=[:stored_searchable, :facetable]>

Defined Under Namespace

Classes: IndexObject

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Map

Returns a new instance of Map.



9
10
11
# File 'lib/active_fedora/indexing/map.rb', line 9

def initialize(hash = {})
  @hash = hash
end

Instance Method Details

#dupObject



13
14
15
# File 'lib/active_fedora/indexing/map.rb', line 13

def dup
  self.class.new(to_hash)
end

#merge(new_hash) ⇒ Object



17
18
19
# File 'lib/active_fedora/indexing/map.rb', line 17

def merge(new_hash)
  self.class.new(to_hash.merge(new_hash))
end

#to_hashObject



21
22
23
# File 'lib/active_fedora/indexing/map.rb', line 21

def to_hash
  @hash.deep_dup
end