class OVIRT::BaseObject
Attributes
client[R]
href[RW]
id[RW]
name[RW]
Public Class Methods
new(client, id, href, name)
click to toggle source
# File lib/ovirt/base_object.rb, line 6 def initialize(client, id, href, name) @id, @href, @name = id, href, name @client = client self end
Public Instance Methods
parse_bool(text)
click to toggle source
# File lib/ovirt/base_object.rb, line 16 def parse_bool text return true if text =~ /^true$/i return false if text =~ /^false$/i raise ArgumentError.new %Q[The string "#{text}" isn't a valid boolean, it should be "true" or "false"] end
parse_version(xml)
click to toggle source
# File lib/ovirt/base_object.rb, line 12 def parse_version xml (xml/'version').first[:major] +"."+ (xml/'version').first[:minor] end