Class: GcDatastore::DatastoreFactory
- Inherits:
-
Object
- Object
- GcDatastore::DatastoreFactory
- Defined in:
- lib/gc_datastore/datastore_factory.rb
Constant Summary collapse
- VERSION =
'v1beta2'
- @@INSTANCE =
nil
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.get ⇒ Object
6 7 8 9 |
# File 'lib/gc_datastore/datastore_factory.rb', line 6 def self.get @@INSTANCE = new unless @@INSTANCE @@INSTANCE end |
Instance Method Details
#create(options) ⇒ Object
11 12 13 |
# File 'lib/gc_datastore/datastore_factory.rb', line 11 def create() return GcDatastore::Datastore.new(newRemoteRpc()) end |
#makeClient(options) ⇒ Object
21 22 23 24 |
# File 'lib/gc_datastore/datastore_factory.rb', line 21 def makeClient() client = GcDatastore::Client.new().() return client end |
#newRemoteRpc(options) ⇒ Object
15 16 17 18 19 |
# File 'lib/gc_datastore/datastore_factory.rb', line 15 def newRemoteRpc() client = makeClient() datastore = client.discovered_api('datastore', VERSION) return GcDatastore::Datastore.new(GcDatastore::RemoteRpc.new(client, )) end |