Created
April 1, 2009 15:08
-
-
Save fsvehla/88733 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class Routing::Router | |
| def initialize(recipient, options = {}) | |
| options.assert_valid_keys(:customer) | |
| @customer = options[:customer] | |
| @recipient = PhoneNumber.new(recipient).internationalise(:local_country => @customer.site_country) | |
| end | |
| def destination | |
| destination = ( | |
| customers_prefered_destination || most_economical_destination | |
| ) | |
| raise UnroutableError if destination == nil | |
| destination = destination.aliased_to if destination.aliased_to | |
| return destination | |
| end | |
| def most_economical_destination | |
| end | |
| def customers_prefered_destination | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment