Sha256: fee597838e07f08b7ea10d2f162477bcf0b4d77709c199d50ab4c66e6d12ca6f
Contents?: true
Size: 521 Bytes
Versions: 27
Compression:
Stored size: 521 Bytes
Contents
# Extensions for the Hash. # class Hash # :nodoc:all # 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_marshal 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
27 entries across 27 versions & 1 rubygems