Class: TextBelt::TextUtils
- Inherits:
-
Object
- Object
- TextBelt::TextUtils
- Defined in:
- lib/textbelt/textutils.rb
Class Method Summary collapse
-
.uri_for(country) ⇒ URI
Return the correct URI for the correct country code.
Class Method Details
.uri_for(country) ⇒ URI
Return the correct URI 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 uri_for(country) uri_string = case country when 'US' base_uri + 'text' when 'CA' base_uri + 'canada' else base_uri + 'intl' end URI(uri_string) end |