Class: OvirtSDK4::GlusterBrickMemoryInfo
- 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.
-
#initialize(opts = {}) ⇒ GlusterBrickMemoryInfo
constructor
Creates a new instance of the GlusterBrickMemoryInfo class.
-
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the
memory_poolsattribute. -
#memory_pools=(list) ⇒ Object
Sets the value of the
memory_poolsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterBrickMemoryInfo
Creates a new instance of the OvirtSDK4::GlusterBrickMemoryInfo class.
4775 4776 4777 4778 |
# File 'lib/ovirtsdk4/types.rb', line 4775 def initialize(opts = {}) super(opts) self.memory_pools = opts[:memory_pools] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
4783 4784 4785 4786 |
# File 'lib/ovirtsdk4/types.rb', line 4783 def ==(other) super && @memory_pools == other.memory_pools end |
#hash ⇒ Object
Generates a hash value for this object.
4791 4792 4793 4794 |
# File 'lib/ovirtsdk4/types.rb', line 4791 def hash super + @memory_pools.hash end |
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the memory_pools attribute.
4744 4745 4746 |
# File 'lib/ovirtsdk4/types.rb', line 4744 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools attribute.
4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 |
# File 'lib/ovirtsdk4/types.rb', line 4753 def memory_pools=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = GlusterMemoryPool.new(value) end end end @memory_pools = list end |