class ManqodRPC
this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint(dpblnt@gmail.com)
Attributes
client_server[R]
manqod_server[R]
Public Instance Methods
alive?()
click to toggle source
# File lib/ManqodRPC.rb, line 10 def alive? true end
connect_to(server_uri)
click to toggle source
# File lib/ManqodRPC.rb, line 16 def connect_to(server_uri) @manqod_server=DRb::DRbObject.new(nil,server_uri) end
nick()
click to toggle source
# File lib/ManqodRPC.rb, line 25 def nick Nick.instance.get_nick end
register_client()
click to toggle source
# File lib/ManqodRPC.rb, line 22 def register_client manqod_server.register_client(ManqodRPC.instance.to_s,self,ManqodDB.instance.manqod_db.name.to_s) end
rpc(proc)
click to toggle source
# File lib/ManqodRPC.rb, line 31 def rpc(proc) einfo("RPC:#{proc}","main") eeval(proc,self) end
start_service(client_uri)
click to toggle source
# File lib/ManqodRPC.rb, line 13 def start_service(client_uri) @client_server=DRb.start_service(client_uri,self) end
to_s()
click to toggle source
# File lib/ManqodRPC.rb, line 28 def to_s "#{Nick.instance.get_nick}@#{@client_server.uri}" end
unregister_client()
click to toggle source
# File lib/ManqodRPC.rb, line 19 def unregister_client manqod_server.unregister_client(ManqodRPC.instance.to_s) end