Method: MARCSpec::Map#initialize

Defined in:
lib/marcspec/map.rb

#initialize(mapname, map) ⇒ Map

Create a new map. The passed map is either a standard hash (KVMap) or a list of duples (for a MultiValueMap)

Parameters:

  • mapname (String)

    The name of this map; can be used to find it later on.

  • map (Hash, Array)

    Either a normal key-value hash (for a KV Map) or an array of duples (2-value arrays) for a MultiValueMap.



22
23
24
25
# File 'lib/marcspec/map.rb', line 22

def initialize(mapname, map)
  @mapname = mapname
  @map = map
end