The Psych serializer. Psych is the new YAML engine in ruby 1.9.
@see JSON @see Syck @see YAML
@private
Deserializes the given string using Psych.
@param [String] string the YAML string @return [Hash] the deserialized object
# File lib/vcr/cassette/serializers/psych.rb, line 39 def deserialize(string) handle_encoding_errors do ::Psych.load(string) end end
The file extension to use for this serializer.
@return [String] “yml”
# File lib/vcr/cassette/serializers/psych.rb, line 21 def file_extension "yml" end
Serializes the given hash using Psych.
@param [Hash] hash the object to serialize @return [String] the YAML string
# File lib/vcr/cassette/serializers/psych.rb, line 29 def serialize(hash) handle_encoding_errors do ::Psych.dump(hash) end end