class Nuggets::Hash::ZipMixin::ZipHash

Public Instance Methods

[](key) click to toggle source
Calls superclass method
# File lib/nuggets/hash/zip_mixin.rb, line 47
def [](key)
  unzipval(super(zipkey(key)))
end
[]=(key, value) click to toggle source
Calls superclass method
# File lib/nuggets/hash/zip_mixin.rb, line 51
def []=(key, value)
  super(zipkey(key), zipval(value))
end
fetch(key, *args) click to toggle source
Calls superclass method
# File lib/nuggets/hash/zip_mixin.rb, line 55
def fetch(key, *args)
  unzipval(super(zipkey(key), *args))
end
store(key, value) click to toggle source
Calls superclass method
# File lib/nuggets/hash/zip_mixin.rb, line 59
def store(key, value)
  super(zipkey(key), zipval(value))
end

Private Instance Methods

unzipkey(key) click to toggle source
# File lib/nuggets/hash/zip_mixin.rb, line 77
def unzipkey(key)
  key.is_a?(ZipKey) ? key.to_s : key
end
unzipval(value) click to toggle source
# File lib/nuggets/hash/zip_mixin.rb, line 69
def unzipval(value)
  value.is_a?(ZipVal) ? value.to_s : value
end
zipkey(key) click to toggle source
# File lib/nuggets/hash/zip_mixin.rb, line 73
def zipkey(key)
  key.is_a?(ZipKey) ? key : ZipKey.new(key)
end
zipval(value) click to toggle source
# File lib/nuggets/hash/zip_mixin.rb, line 65
def zipval(value)
  value.is_a?(ZipVal) ? value : ZipVal.new(value)
end