Class: ASS::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



2
3
4
# File 'lib/ass/client.rb', line 2

def initialize(opts={})
  @rpc_opts = opts
end

Instance Method Details

#call(name, method, data, opts = {}, meta = nil) ⇒ Object

makes synchronized call through ASS::RPC



16
17
18
# File 'lib/ass/client.rb', line 16

def call(name,method,data,opts={},meta=nil)
  rpc.call(name,method,data,opts,meta)
end

#cast(name, method, data, opts = {}, meta = nil) ⇒ Object



11
12
13
# File 'lib/ass/client.rb', line 11

def cast(name,method,data,opts={},meta=nil)
  ASS.cast(name,method,data,opts,meta)
end

#rpcObject



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

def rpc
  # should lazy start the RPC server
  @rpc ||= ASS.rpc(@rpc_opts)
end