require 'yaml' class Child def initialize @d = 'helo' end end class Test def initialize @a = 'hello' @b = 'bye' @c = Child.new end def hello p @a end end test = Test.new y test