Sha256: 7100b5772ab5925f57bb68fcbef6b03a377968d8a3f23f75f3c7759506e7eb46
Contents?: true
Size: 289 Bytes
Versions: 1
Compression:
Stored size: 289 Bytes
Contents
class Hash def sg_rules_sort self.each do |sg| sg[1]['rules'].sort_by! do |rule| rule.inject(0) do |ascii,(k,v)| ascii += v.ord.to_i unless v.nil? ascii end end unless sg[1].nil? || sg[1]['rules'].nil? end Hash[self] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kakine-0.2.0 | lib/kakine/hash_sort.rb |