Class: AmazonRuby::Locale
- Inherits:
-
Object
- Object
- AmazonRuby::Locale
- Defined in:
- lib/amazon-ruby/locale.rb
Constant Summary collapse
- HOSTS =
Country hosts
{ 'ca' => 'ecs.amazonaws.ca', 'cn' => 'webservices.amazon.cn', 'de' => 'ecs.amazonaws.de', 'fr' => 'ecs.amazonaws.fr', 'it' => 'webservices.amazon.it', 'jp' => 'ecs.amazonaws.jp', 'us' => 'ecs.amazonaws.com', 'uk' => 'ecs.amazonaws.co.uk' }
Instance Method Summary collapse
-
#country ⇒ Object
Country.
-
#host ⇒ Object
Host.
-
#initialize(country) ⇒ Locale
constructor
Set country on initialization, raise InvalidLocale if not found.
Constructor Details
#initialize(country) ⇒ Locale
Set country on initialization, raise InvalidLocale if not found
17 18 19 20 21 |
# File 'lib/amazon-ruby/locale.rb', line 17 def initialize(country) raise UnsupportedCountry unless HOSTS.keys.include?(country) @host = HOSTS[country] @country = country end |
Instance Method Details
#country ⇒ Object
Country
29 30 31 |
# File 'lib/amazon-ruby/locale.rb', line 29 def country @country end |
#host ⇒ Object
Host
24 25 26 |
# File 'lib/amazon-ruby/locale.rb', line 24 def host @host end |