Class: ActiveRecordToSimpledb

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

Defined Under Namespace

Modules: Callbacks, JobQueue, Query Classes: Client

Class Method Summary collapse

Class Method Details

.aws_connectObject

Public: It connect to aws

Example

ActiveRecordToSimpledb.aws_connect

Return the connection object to AWS



31
32
33
# File 'lib/active_record_to_simpledb.rb', line 31

def self.aws_connect
  RightAws::SdbInterface.new(AWS.key, AWS.secret)
end

.connectObject

Public: stablishes the connection



38
39
40
# File 'lib/active_record_to_simpledb.rb', line 38

def self.connect
  RightAws::ActiveSdb.establish_connection
end

.create_domain(name) ⇒ Object

Public: It created a new Simpledb domain

string - The name of the domain we want to create Example

ActiveRecordToSimpledb.create_domain(“new_domain”)



50
51
52
# File 'lib/active_record_to_simpledb.rb', line 50

def self.create_domain(name)
  ActiveRecordToSimpledb.aws_connect.create_domain(name)
end