Class: Kangaroo::Util::Client

Inherits:
Rapuncel::Client
  • Object
show all
Defined in:
lib/kangaroo/util/client.rb

Constant Summary collapse

SERVICES =
%w(db common object wizard report).freeze

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Client

Initialize a Kangaroo XMLRPC Client

Parameters:

  • configuration (Hash)

    configuration Hash

Options Hash (configuration):

  • 'host' (String)

    Hostname or IP address

  • 'port' (String, Number)

    Port



15
16
17
# File 'lib/kangaroo/util/client.rb', line 15

def initialize configuration
  super configuration.merge(:raise_on => :both)
end

Instance Method Details

#commonKangaroo::Util::Proxy::Common

Access the Common Proxy

Returns:



47
48
49
# File 'lib/kangaroo/util/client.rb', line 47

def common
  @common_proxy ||= Proxy::Common.new common_service
end

#dbKangaroo::Util::Proxy::Db

Access the Db Proxy

Returns:



54
55
56
# File 'lib/kangaroo/util/client.rb', line 54

def db
  @db_proxy ||= Proxy::Db.new db_service
end

#inspectObject



58
59
60
# File 'lib/kangaroo/util/client.rb', line 58

def inspect
  "#Kangaroo::Util::Client:0x#{hash.to_s(16)}>"
end

#superadmin(super_password) ⇒ Kangaroo::Util::Proxy::Superadmin

Access the Superadmin Proxy

Parameters:

  • super_password (String)

    Superadmin password

Returns:



40
41
42
# File 'lib/kangaroo/util/client.rb', line 40

def superadmin super_password
  Proxy::Superadmin.new db_service, super_password
end