Class: GcDatastore::RemoteRpc

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

Instance Method Summary collapse

Constructor Details

#initialize(client, options) ⇒ RemoteRpc

Returns a new instance of RemoteRpc.



3
4
5
6
# File 'lib/gc_datastore/remote_rpc.rb', line 3

def initialize(client, options) 
  @dataset_id = options[:dataset_id]
  @client = client
end

Instance Method Details

#call(method, body_object) ⇒ Object



8
9
10
11
12
13
# File 'lib/gc_datastore/remote_rpc.rb', line 8

def call(method, body_object)
  @client.execute(
    :api_method => method,
    :parameters => {:datasetId => @dataset_id},
    :body_object => body_object)
end