Class: Nuggets::Hash::ZipMixin::ZipHash
- Inherits:
-
Hash
show all
- Defined in:
- lib/nuggets/hash/zip_mixin.rb
Instance Method Summary
collapse
Methods inherited from Hash
#at, #first, #in_order, #insert, #insert!, #last, #only, #only_pair, #rand
#zip
Methods included from NestMixin
#nest
Methods included from SeenMixin
#seen
Methods included from IDMapMixin
#idmap
#deep_merge, #deep_merge!
Methods included from BlankMixin
#vain?
#unroll
Instance Method Details
48
49
50
|
# File 'lib/nuggets/hash/zip_mixin.rb', line 48
def [](key)
unzipval(super(zipkey(key)))
end
|
#[]=(key, value) ⇒ Object
52
53
54
|
# File 'lib/nuggets/hash/zip_mixin.rb', line 52
def []=(key, value)
super(zipkey(key), zipval(value))
end
|
#fetch(key, *args) ⇒ Object
56
57
58
|
# File 'lib/nuggets/hash/zip_mixin.rb', line 56
def fetch(key, *args)
unzipval(super(zipkey(key), *args))
end
|
#store(key, value) ⇒ Object
60
61
62
|
# File 'lib/nuggets/hash/zip_mixin.rb', line 60
def store(key, value)
super(zipkey(key), zipval(value))
end
|