Class: Spacewalk::SystemId
- Inherits:
-
Object
- Object
- Spacewalk::SystemId
- Defined in:
- lib/spacewalk/system_id.rb
Instance Method Summary collapse
-
#initialize(client, config) ⇒ SystemId
constructor
A new instance of SystemId.
- #to_xml ⇒ Object
Constructor Details
#initialize(client, config) ⇒ SystemId
Returns a new instance of SystemId.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/spacewalk/system_id.rb', line 4 def initialize client, 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 # <params> # <param> # <value> # <struct> # <member> # <name>username</name> # <value><string>admin</string></value> # </member> File.open(@path) do |f| @raw = f.read @members = client.get_parser.parseMethodResponse(@raw) end puts "SystemId => #{@members.inspect}" end |
Instance Method Details
#to_xml ⇒ Object
22 23 24 |
# File 'lib/spacewalk/system_id.rb', line 22 def to_xml @raw end |