module VCR::Cassette::Serializers::YAML

def serialize(hash)

Returns:
  • (String) - the YAML string

Parameters:
  • hash (Hash) -- the object to serialize
def serialize(hash)
  handle_encoding_errors do
    result = ::YAML.dump(hash)
    result.gsub!(": \n", ": null\n") # set canonical null value in order to avoid trailing whitespaces
    result
  end
end