Module: Atheme

Extended by:
Authenticate, Configuration
Defined in:
lib/atheme.rb,
lib/atheme.rb,
lib/atheme/version.rb

Defined Under Namespace

Modules: Authenticate, Configuration, Error, Parser, ParserHelper, Support Classes: ObjectifiedHash, Service

Constant Summary collapse

SERVICES =
[]
PARSERS =
{}
VERSION =
'0.1.0'

Constants included from Configuration

Configuration::REQUIRED_OPTIONS

Instance Attribute Summary

Attributes included from Authenticate

#user

Class Method Summary collapse

Methods included from Configuration

configure, options, validate_options

Methods included from Authenticate

login, logout

Class Method Details

.call(*args) ⇒ Object



35
36
37
# File 'lib/atheme.rb', line 35

def self.call(*args)
  server.call(*args)
end

.serverObject



31
32
33
# File 'lib/atheme.rb', line 31

def self.server
  XMLRPC::Client.new2("#{Atheme.options.protocol}://#{Atheme.options.hostname}:#{Atheme.options.port}/xmlrpc")
end

.set_user(cookie, username, ip) ⇒ Object



39
40
41
# File 'lib/atheme.rb', line 39

def self.set_user(cookie, username, ip)
  self.user = Atheme::ObjectifiedHash.new({ cookie: cookie, username: username, ip: ip })
end