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

Version Path
ydim-1.1.5 lib/ydim/client.rb
ydim-1.1.4 lib/ydim/client.rb
ydim-1.1.3 lib/ydim/client.rb
ydim-1.1.2 lib/ydim/client.rb
ydim-1.1.1 lib/ydim/client.rb
ydim-1.1.0 lib/ydim/client.rb
ydim-1.0.9 lib/ydim/client.rb
ydim-1.0.8 lib/ydim/client.rb
ydim-1.0.7 lib/ydim/client.rb
ydim-1.0.6 lib/ydim/client.rb
ydim-1.0.5 lib/ydim/client.rb
ydim-1.0.4 lib/ydim/client.rb
ydim-1.0.3 lib/ydim/client.rb
ydim-1.0.2 lib/ydim/client.rb
ydim-1.0.1 lib/ydim/client.rb
ydim-1.0.0 lib/ydim/client.rb