Created
July 31, 2008 15:07
-
-
Save christianromney/3453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only fixes the structural stupidity, not the retardedness | |
# of the underlying method of package finding | |
def get_cruise_package(cruise_package_code) | |
returning(package = nil) do |pack| | |
[ | |
:getPreHotelPackage, :getPostHotelPackage, :getShorexPackage, | |
:getPreTransfersPackage, :getPostTransfersPackage, getMotorcoachPackage | |
].detect do |find_by_package_type| | |
pack = send(find_by_package_type, cruise_package_code) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment