Class: Jungle::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/jungle/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_key_id = nil, secret_access_key = nil) ⇒ Client

Return a new Jungle client on which you get SQS or S3 clients and make requests to Amazon AWS

+access_key_id+ is an AWS access key (20 bytes long)
+secret_access_key+ is an AWS secret access key used to compute HMAC:SHA1 (40 bytes)


6
7
8
# File 'lib/jungle/client.rb', line 6

def initialize(access_key_id = nil, secret_access_key = nil)
  @auth = Auth.new(access_key_id, secret_access_key)
end

Instance Method Details

#sqsObject

Return an SQSClient with the credentials of this Client. The returned object is a singleton, and as such the same instance will be returned for all calls to this method on this client



13
14
15
# File 'lib/jungle/client.rb', line 13

def sqs
  @sqs ||= SQSClient.new(@auth)
end