Sha256: e96aa9ff3eeac58ae10068aa1a110131b7b73554309c89c935df0e5c6969a8ec
Contents?: true
Size: 805 Bytes
Versions: 1
Compression:
Stored size: 805 Bytes
Contents
module AmazonProduct # An Amazon locale. class Locale # Available Amazon hosts. 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' } # The Amazon Web Services access key. attr_accessor :key # The Amazon Web Services secret. attr_accessor :secret # The Amazon associate tag. attr_accessor :tag def initialize(locale) raise BadLocale unless HOSTS.has_key?(locale) @locale = locale end # The Amazon host. def host HOSTS[@locale] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amazon_product-3.0.0.pre.1 | lib/amazon_product/locale.rb |