Class: Spacewalk::Xmlrpc

Inherits:
Object
  • Object
show all
Defined in:
lib/spacewalk/xmlrpc.rb

Class Method Summary collapse

Class Method Details

.decode(what) ⇒ Object

<params>

<param>
  <value>
    <struct>
      <member>
        <name>username</name>
        <value><string>admin</string></value>
      </member>
  <value><string>...
  <value><array><data>...


47
48
49
50
51
52
53
54
55
56
# File 'lib/spacewalk/xmlrpc.rb', line 47

def self.decode what
  @doc.root.elements["params/param"]

  initialize config
  raise "Expecting a Spacewalk::Config parameter to #{self.class}.new" unless config.is_a?(Spacewalk::Config)
  @path = config["systemIdPath"]
  raise "systemIdPath is empty !" unless @path
  @doc = REXML::Document.new(File.open(@path))
  @members = @doc.root.elements["params/param"]
end