Class: RubyEventStore::Serializers::YAML

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_event_store/serializers/yaml.rb

Class Method Summary collapse

Class Method Details

.dump(value) ⇒ Object



8
9
10
# File 'lib/ruby_event_store/serializers/yaml.rb', line 8

def self.dump(value)
  ::YAML.dump(value)
end

.load(serialized) ⇒ Object



12
13
14
# File 'lib/ruby_event_store/serializers/yaml.rb', line 12

def self.load(serialized)
  ::YAML.respond_to?(:unsafe_load) ? ::YAML.unsafe_load(serialized) : ::YAML.load(serialized)
end