Class: Thrift::Types::Known::Any::CustomYAML

Inherits:
Object
  • Object
show all
Defined in:
lib/thrift/types/known/any/any.rb

Class Method Summary collapse

Class Method Details

.dump(obj) ⇒ Object



11
12
13
# File 'lib/thrift/types/known/any/any.rb', line 11

def dump(obj)
  YAML.dump(obj)[4..-1]
end

.load(val) ⇒ Object



15
16
17
# File 'lib/thrift/types/known/any/any.rb', line 15

def load(val)
  YAML.safe_load(val)
end