Sha256: 8948ac1fcbc943aac243f153d0013205487ef2bce3aedb31452c799642364920
Contents?: true
Size: 519 Bytes
Versions: 16
Compression:
Stored size: 519 Bytes
Contents
# Extensions for the Hash. # class Hash # Dumps jsonized self to the path given. Minus extension. # def dump_json path File.open(path, 'w') do |out_file| Yajl::Encoder.encode self, out_file end end # Dumps binary self to the path given. Minus extension. # def dump_marshalled path File.open(path, 'w:binary') do |out_file| Marshal.dump self, out_file end end # Use yajl's encoding. # def to_json options = {} Yajl::Encoder.encode self, options end end
Version data entries
16 entries across 16 versions & 1 rubygems