Class: OvirtSDK4::Kernel
- 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 = {}) ⇒ Kernel
constructor
Creates a new instance of the Kernel class.
-
#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 = {}) ⇒ Kernel
Creates a new instance of the OvirtSDK4::Kernel class.
7899 7900 7901 7902 |
# File 'lib/ovirtsdk4/types.rb', line 7899 def initialize(opts = {}) super(opts) self.version = opts[:version] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
7907 7908 7909 7910 |
# File 'lib/ovirtsdk4/types.rb', line 7907 def ==(other) super && @version == other.version end |
#hash ⇒ Object
Generates a hash value for this object.
7915 7916 7917 7918 |
# File 'lib/ovirtsdk4/types.rb', line 7915 def hash super + @version.hash end |
#version ⇒ Version
Returns the value of the version
attribute.
7869 7870 7871 |
# File 'lib/ovirtsdk4/types.rb', line 7869 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.
7882 7883 7884 7885 7886 7887 |
# File 'lib/ovirtsdk4/types.rb', line 7882 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |