$ irb
>> require 'yaml'
=> true
>> Cat = Struct.new(:one, :two, :three)
=> Cat
>> j = Cat.new(1, 2, 3)
=> #
>> puts j.to_yaml
--- !ruby/struct:Cat 
one: 1
two: 2
three: 3
=> nil