end class Room < Base xml_reader :total_price, :from => '@TotalPrice', :as => Float xml_reader :nb_rooms, :from => '@NbRooms', :as => Integer def breakfast_included? %w(B D P A).include?(meals.to_s) end end class Hotel < Base xml_reader :native_id, :from => "@DistNum" xml_reader :name, :from => "@Name" xml_reader :rooms, :as => [Room] end class FB_MultirateRS < Base xml_reader :hotels, :as => [Hotel], :from => 'Hotels/Hotel' end end