Class: Nuggets::Hash::ZipMixin::ZipHash

Inherits:
Hash show all
Defined in:
lib/nuggets/hash/zip_mixin.rb

Direct Known Subclasses

ZipKeyHash, ZipValHash

Instance Method Summary collapse

Methods inherited from Hash

#at, #first, #in_order, #insert, #insert!, #last, #only, #only_pair, #rand

Methods included from Nuggets::Hash::ZipMixin

#zip

Methods included from NestMixin

#array, #identity, #nest

Methods included from SeenMixin

#seen

Methods included from IDMapMixin

#idmap

Methods included from DeepMergeMixin

#deep_merge, #deep_merge!

Methods included from DeepFetchMixin

#deep_fetch

Methods included from BlankMixin

#vain?

Methods included from UnrollMixin

#unroll

Methods included from DeprocMixin

#deproc, #deproc!

Instance Method Details

#[](key) ⇒ Object



47
48
49
# File 'lib/nuggets/hash/zip_mixin.rb', line 47

def [](key)
  unzipval(super(zipkey(key)))
end

#[]=(key, value) ⇒ Object



51
52
53
# File 'lib/nuggets/hash/zip_mixin.rb', line 51

def []=(key, value)
  super(zipkey(key), zipval(value))
end

#fetch(key, *args) ⇒ Object



55
56
57
# File 'lib/nuggets/hash/zip_mixin.rb', line 55

def fetch(key, *args)
  unzipval(super(zipkey(key), *args))
end

#store(key, value) ⇒ Object



59
60
61
# File 'lib/nuggets/hash/zip_mixin.rb', line 59

def store(key, value)
  super(zipkey(key), zipval(value))
end