Sha256: da00d540b46056f0c214837cca98aefff96f5d025977a4508194586c49b9119e

Contents?: true

Size: 358 Bytes

Versions: 1

Compression:

Stored size: 358 Bytes

Contents

# Extensions for the Hash.
#
class Hash
  
  # Dumps binary self to the path given.
  #
  # TODO Still used? If yes, spec!
  #
  def dump_to path
    File.open(path, 'w:binary') do |out_file|
      Yajl::Encoder.encode self, out_file
    end
  end
  
  # Use yajl's encoding.
  #
  def to_json options = {}
    Yajl::Encoder.encode self, options
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picky-0.2.4 lib/picky/extensions/hash.rb