Class: OvirtSDK4::FopStatistic
- 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 = {}) ⇒ FopStatistic
constructor
Creates a new instance of the FopStatistic class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ FopStatistic
Creates a new instance of the OvirtSDK4::FopStatistic class.
4711 4712 4713 4714 4715 |
# File 'lib/ovirtsdk4/types.rb', line 4711 def initialize(opts = {}) super(opts) self.name = opts[:name] self.statistics = opts[:statistics] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
4720 4721 4722 4723 4724 |
# File 'lib/ovirtsdk4/types.rb', line 4720 def ==(other) super && @name == other.name && @statistics == other.statistics end |
#hash ⇒ Object
Generates a hash value for this object.
4729 4730 4731 4732 4733 |
# File 'lib/ovirtsdk4/types.rb', line 4729 def hash super + @name.hash + @statistics.hash end |
#name ⇒ String
Returns the value of the name attribute.
4660 4661 4662 |
# File 'lib/ovirtsdk4/types.rb', line 4660 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
4669 4670 4671 |
# File 'lib/ovirtsdk4/types.rb', line 4669 def name=(value) @name = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
4678 4679 4680 |
# File 'lib/ovirtsdk4/types.rb', line 4678 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 |
# File 'lib/ovirtsdk4/types.rb', line 4687 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end |