Class: OvirtSDK4::FopStatistic
- 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 = {}) ⇒ FopStatistic
constructor
Creates a new instance of the FopStatistic class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ FopStatistic
Creates a new instance of the OvirtSDK4::FopStatistic class.
4487 4488 4489 4490 4491 |
# File 'lib/ovirtsdk4/types.rb', line 4487 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.
4496 4497 4498 4499 4500 |
# File 'lib/ovirtsdk4/types.rb', line 4496 def ==(other) super && @name == other.name && @statistics == other.statistics end |
#hash ⇒ Object
Generates a hash value for this object.
4505 4506 4507 4508 4509 |
# File 'lib/ovirtsdk4/types.rb', line 4505 def hash super + @name.hash + @statistics.hash end |
#name ⇒ String
Returns the value of the name
attribute.
4436 4437 4438 |
# File 'lib/ovirtsdk4/types.rb', line 4436 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
4445 4446 4447 |
# File 'lib/ovirtsdk4/types.rb', line 4445 def name=(value) @name = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
4454 4455 4456 |
# File 'lib/ovirtsdk4/types.rb', line 4454 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 |
# File 'lib/ovirtsdk4/types.rb', line 4463 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 |