Class: TextBelt::TextUtils
- Inherits:
-
Object
- Object
- TextBelt::TextUtils
- Defined in:
- lib/textbelt/textutils.rb
Class Method Summary collapse
-
.url_for(country) ⇒ URI
Return the correct URL for the correct country code.
Class Method Details
.url_for(country) ⇒ URI
Return the correct URL for the correct country code
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/textbelt/textutils.rb', line 11 def url_for(country) url_string = case country when 'US' base_url + 'text' when 'CA' base_url + 'canada' else base_url + 'intl' end URI(url_string) end |