Module: ModernTimes::MarshalStrategy::YAML

Extended by:
YAML
Included in:
YAML
Defined in:
lib/modern_times/marshal_strategy/yaml.rb

Instance Method Summary collapse

Instance Method Details

#marshal(object) ⇒ Object



10
11
12
# File 'lib/modern_times/marshal_strategy/yaml.rb', line 10

def marshal(object)
  object.to_yaml
end

#marshal_typeObject



6
7
8
# File 'lib/modern_times/marshal_strategy/yaml.rb', line 6

def marshal_type
  :text
end

#unmarshal(msg) ⇒ Object



14
15
16
# File 'lib/modern_times/marshal_strategy/yaml.rb', line 14

def unmarshal(msg)
  ::YAML.load(msg)
end