Class: OvirtSDK4::ProductInfo
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ ProductInfo
constructor
Creates a new instance of the ProductInfo class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#vendor ⇒ String
Returns the value of the
vendor
attribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendor
attribute. -
#version ⇒ Version
Returns the value of the
version
attribute. -
#version=(value) ⇒ Object
Sets the value of the
version
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ProductInfo
Creates a new instance of the OvirtSDK4::ProductInfo class.
14418 14419 14420 14421 14422 14423 |
# File 'lib/ovirtsdk4/types.rb', line 14418 def initialize(opts = {}) super(opts) self.name = opts[:name] self.vendor = opts[:vendor] self.version = opts[:version] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
14428 14429 14430 14431 14432 14433 |
# File 'lib/ovirtsdk4/types.rb', line 14428 def ==(other) super && @name == other.name && @vendor == other.vendor && @version == other.version end |
#hash ⇒ Object
Generates a hash value for this object.
14438 14439 14440 14441 14442 14443 |
# File 'lib/ovirtsdk4/types.rb', line 14438 def hash super + @name.hash + @vendor.hash + @version.hash end |
#name ⇒ String
Returns the value of the name
attribute.
14348 14349 14350 |
# File 'lib/ovirtsdk4/types.rb', line 14348 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
14357 14358 14359 |
# File 'lib/ovirtsdk4/types.rb', line 14357 def name=(value) @name = value end |
#vendor ⇒ String
Returns the value of the vendor
attribute.
14366 14367 14368 |
# File 'lib/ovirtsdk4/types.rb', line 14366 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor
attribute.
14375 14376 14377 |
# File 'lib/ovirtsdk4/types.rb', line 14375 def vendor=(value) @vendor = value end |
#version ⇒ Version
Returns the value of the version
attribute.
14384 14385 14386 |
# File 'lib/ovirtsdk4/types.rb', line 14384 def version @version end |
#version=(value) ⇒ Object
Sets the value of the version
attribute.
The value
parameter can be an instance of Version or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
14397 14398 14399 14400 14401 14402 |
# File 'lib/ovirtsdk4/types.rb', line 14397 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |