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 6 def initialize(client, id, href, name) 7 @id, @href, @name = id, href, name 8 @client = client 9 self 10 end
Public Instance Methods
parse_bool(text)
click to toggle source
# File lib/ovirt/base_object.rb 16 def parse_bool text 17 return true if text =~ /^true$/i 18 return false if text =~ /^false$/i 19 raise ArgumentError.new %Q[The string "#{text}" isn't a valid boolean, it should be "true" or "false"] 20 end
parse_version(xml)
click to toggle source
# File lib/ovirt/base_object.rb 12 def parse_version xml 13 (xml/'version').first[:major] +"."+ (xml/'version').first[:minor] 14 end