Skip to content

Instantly share code, notes, and snippets.

@fsvehla
Created April 1, 2009 15:08
Show Gist options
  • Save fsvehla/88733 to your computer and use it in GitHub Desktop.
Save fsvehla/88733 to your computer and use it in GitHub Desktop.
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