Method: Fog::AWS::Elasticache::Mock#initialize

Defined in:
lib/fog/aws/elasticache.rb

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



146
147
148
149
150
151
152
153
154
# File 'lib/fog/aws/elasticache.rb', line 146

def initialize(options={})
  @aws_credentials_expire_at = Time::now + 20
  setup_credentials(options)
  @region = options[:region] || 'us-east-1'
  unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1',
          'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region)
    raise ArgumentError, "Unknown region: #{@region.inspect}"
  end
end