Parent

Methods

Hash

Public Instance Methods

to_sha2() click to toggle source
    # File lib/merb-cache/core_ext/hash.rb, line 5
 5:   def to_sha2
 6:     string = ""
 7:     keys.sort_by{|k| k.to_s}.each do |k| 
 8:       case self[k]
 9:       when Array
10:         string << self[k].join
11:       when Hash
12:         string << self[k].to_sha2
13:       else
14:         string << self[k].to_s
15:       end
16:     end
17:     Digest::SHA2.hexdigest(string)
18:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.