Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/silver/cache.rb

Overview

Monkey patches Hash to allow for conversion to a BareHash where all values are strings. This is good for mixing results with Redis results which are always stored as strings.

Direct Known Subclasses

BareHash

Instance Method Summary collapse

Instance Method Details

#to_bareObject



26
27
28
29
30
31
32
# File 'lib/silver/cache.rb', line 26

def to_bare

    bhash = BareHash.new
    self.each{|k,v| bhash[k] = v}
    bhash

end