module VCR::Cassette::Serializers::Syck
The Syck serializer. Syck is the legacy YAML engine in ruby 1.8 and 1.9.
Constants
- ENCODING_ERRORS
-
@private
Public Instance Methods
Source
# File lib/vcr/cassette/serializers/syck.rb, line 39 def deserialize(string) handle_encoding_errors do using_syck { ::YAML.load(string) } end end
Source
# File lib/vcr/cassette/serializers/syck.rb, line 21 def file_extension "yml" end
The file extension to use for this serializer.
@return [String] “yml”
Source
# File lib/vcr/cassette/serializers/syck.rb, line 29 def serialize(hash) handle_encoding_errors do using_syck { ::YAML.dump(hash) } end end
Private Instance Methods
Source
# File lib/vcr/cassette/serializers/syck.rb, line 47 def using_syck return yield unless defined?(::YAML::ENGINE) original_engine = ::YAML::ENGINE.yamler ::YAML::ENGINE.yamler = 'syck' begin yield ensure ::YAML::ENGINE.yamler = original_engine end end