Skip to content

Instantly share code, notes, and snippets.

(byebug) pp res['listing']
{"prop_type"=>"condo",
"prop_sub_type"=>"condos",
"price"=>299900,
"year_built"=>1960,
"permalink"=>"3600-N-Lake-Shore-Dr-Apt-815_Chicago_IL_60613_M84876-01586",
"address"=>
{"city"=>"Chicago",
"line"=>"3600 N Lake Shore Dr Apt 815",
"postal_code"=>"60613",
require 'yaml'
YAML::ENGINE.yamler = 'psych'
puts "Custom encode_with and init_with"
class A
attr_reader :b
def initialize(b)
@b=b
end
end
class B