Sha256: 695474d32f37e4f0cc1b943aaf5129804e019d94edc4070206a2473ba4448e62
Contents?: true
Size: 639 Bytes
Versions: 3
Compression:
Stored size: 639 Bytes
Contents
require 'xmlrpc/client' require 'ostruct' require File.join(File.dirname(__FILE__), 'rira', 'model') require File.join(File.dirname(__FILE__), 'rira', 'base') def Rira(url) unless url =~ %r{/rpc/xmlrpc$} url += '/' unless url[-1] == ?/ url += 'rpc/xmlrpc' end Rira::Client.new(url) end module Rira class RPCError < StandardError def initialize(fault_exception) super("#{fault_exception.faultCode}: #{fault_exception.faultString}") end end class Client def initialize(url) @url = url end def login(username, password) Rira::Base.new(@url, username, password) end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
brightspark3-rira-0.0.3 | lib/rira.rb |
lackac-rira-0.0.2 | lib/rira.rb |
lackac-rira-0.0.3 | lib/rira.rb |