Sha256: 520bed1d6806f48c26b2e3c2d6dd89e0ad796ecfe893861424ce66fcbc3a8b2f
Contents?: true
Size: 620 Bytes
Versions: 16
Compression:
Stored size: 620 Bytes
Contents
#!/usr/bin/env ruby # Client -- ydim -- 12.01.2006 -- hwyss@ywesee.com require 'drb' module YDIM class Client include DRb::DRbUndumped attr_reader :session def initialize(config) @config = config DRb.start_service(config.client_url) end def login(server, private_key) @server = server @session = @server.login(self, @config.user) { |challenge| if(private_key.respond_to?(:syssign)) private_key.syssign(challenge) end } end def logout @server.logout(@session) if(@server) end def method_missing(meth, *args, &block) @session.send(meth, *args, &block) end end end
Version data entries
16 entries across 16 versions & 1 rubygems