class Temple::ImmutableMap
@api public
Immutable map class which supports map merging
def [](key)
def [](key) @map.each {|h| return h[key] if h.include?(key) } nil end
def each
def each keys.each {|k| yield(k, self[k]) } end
def include?(key)
def include?(key) @map.any? {|h| h.include?(key) } end
def initialize(*map)
def initialize(*map) @map = map.compact end
def keys
def keys @map.inject([]) {|keys, h| keys.concat(h.keys) }.uniq end
def to_hash
def to_hash result = {} each {|k, v| result[k] = v } result end
def values
def values keys.map {|k| self[k] } end