Class: OvirtSDK4::VolumeGroup
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ VolumeGroup
constructor
Creates a new instance of the VolumeGroup class.
-
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the
logical_unitsattribute. -
#logical_units=(list) ⇒ Object
Sets the value of the
logical_unitsattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ VolumeGroup
Creates a new instance of the OvirtSDK4::VolumeGroup class.
28502 28503 28504 28505 28506 28507 |
# File 'lib/ovirtsdk4/types.rb', line 28502 def initialize(opts = {}) super(opts) self.id = opts[:id] self.logical_units = opts[:logical_units] self.name = opts[:name] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
28512 28513 28514 28515 28516 28517 |
# File 'lib/ovirtsdk4/types.rb', line 28512 def ==(other) super && @id == other.id && @logical_units == other.logical_units && @name == other.name end |
#hash ⇒ Object
Generates a hash value for this object.
28522 28523 28524 28525 28526 28527 |
# File 'lib/ovirtsdk4/types.rb', line 28522 def hash super + @id.hash + @logical_units.hash + @name.hash end |
#id ⇒ String
Returns the value of the id attribute.
28431 28432 28433 |
# File 'lib/ovirtsdk4/types.rb', line 28431 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
28440 28441 28442 |
# File 'lib/ovirtsdk4/types.rb', line 28440 def id=(value) @id = value end |
#logical_units ⇒ Array<LogicalUnit>
Returns the value of the logical_units attribute.
28449 28450 28451 |
# File 'lib/ovirtsdk4/types.rb', line 28449 def logical_units @logical_units end |
#logical_units=(list) ⇒ Object
Sets the value of the logical_units attribute.
28458 28459 28460 28461 28462 28463 28464 28465 28466 28467 28468 |
# File 'lib/ovirtsdk4/types.rb', line 28458 def logical_units=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = LogicalUnit.new(value) end end end @logical_units = list end |
#name ⇒ String
Returns the value of the name attribute.
28475 28476 28477 |
# File 'lib/ovirtsdk4/types.rb', line 28475 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
28484 28485 28486 |
# File 'lib/ovirtsdk4/types.rb', line 28484 def name=(value) @name = value end |