Sha256: e5f5adb6274a39adaec910bef4dc8cb21a37aae244c8be07761d07908a9335f5
Contents?: true
Size: 188 Bytes
Versions: 2
Compression:
Stored size: 188 Bytes
Contents
module Bencoding module Hash def to_bencoding "d"+sort{|a,b|a[0].to_s<=>b[0].to_s}.collect{|key, item|key.to_bencoding+item.to_bencoding}.join+"e" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simonmenke-bencoding-0.0.2 | lib/bencoding/hash.rb |
simonmenke-bencoding-0.0.3 | lib/bencoding/hash.rb |