The output is the following:
$ ruby train.rb
Destination: [#<struct Passenger name={:name=>"Bill Smith"}>, #<struct Passenger name={:name=>"Sarah Robot"}>]
Cars: {:destination=>"New York", :number_of_engines=>4, :caboose=>true, :number_of_cars=>5}
Caboose: 
Passengers: [#<struct Passenger name={:name=>"Bill Smith"}>, #<struct Passenger name={:name=>"Sarah Robot"}>]
train.rb:11:in `<main>': undefined method `number_of_engines' for #<Train:0x007fb9311a86b8> (NoMethodError)