Class: Class

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

Instance Method Summary collapse

Instance Method Details

#has_em_remote_class(remote_class_name, opts) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/em_remote_call/client.rb', line 2

def has_em_remote_class(remote_class_name, opts)
  extend EM::RemoteCall
  class << self
    attr_accessor :remote_connection
    extend EM::RemoteCall
  end
  
  opts[:name] ||= :default
  opts[:remote_class_name] = remote_class_name
  self.remote_connection = EM::RemoteCall::Client.find(opts[:name]) || EM::RemoteCall::Client.new(opts)
end