Class: OvirtSDK4::GlusterBrickMemoryInfo
- 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 = {}) ⇒ GlusterBrickMemoryInfo
constructor
Creates a new instance of the GlusterBrickMemoryInfo class.
-
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the
memory_pools
attribute. -
#memory_pools=(list) ⇒ Object
Sets the value of the
memory_pools
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ GlusterBrickMemoryInfo
Creates a new instance of the OvirtSDK4::GlusterBrickMemoryInfo class.
4551 4552 4553 4554 |
# File 'lib/ovirtsdk4/types.rb', line 4551 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.
4559 4560 4561 4562 |
# File 'lib/ovirtsdk4/types.rb', line 4559 def ==(other) super && @memory_pools == other.memory_pools end |
#hash ⇒ Object
Generates a hash value for this object.
4567 4568 4569 4570 |
# File 'lib/ovirtsdk4/types.rb', line 4567 def hash super + @memory_pools.hash end |
#memory_pools ⇒ Array<GlusterMemoryPool>
Returns the value of the memory_pools
attribute.
4520 4521 4522 |
# File 'lib/ovirtsdk4/types.rb', line 4520 def memory_pools @memory_pools end |
#memory_pools=(list) ⇒ Object
Sets the value of the memory_pools
attribute.
4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 |
# File 'lib/ovirtsdk4/types.rb', line 4529 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 |