Sha256: bfe388917ce5fdd3b8787c9b9bc2b5f44286d59fcfdd31f3d4f4ed6677b85106
Contents?: true
Size: 532 Bytes
Versions: 52
Compression:
Stored size: 532 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_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
52 entries across 52 versions & 1 rubygems