Class: OvirtSDK4::BlockStatistic
- Inherits:
-
Struct
- Object
- Struct
- OvirtSDK4::BlockStatistic
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary (collapse)
-
- (BlockStatistic) initialize(opts = {})
constructor
Creates a new instance of the BlockStatistic class.
-
- (Array<Statistic>) statistics
Returns the value of the
statistics
attribute. -
- (Object) statistics=(list)
Sets the value of the
statistics
attribute.
Methods included from Type
Constructor Details
- (BlockStatistic) initialize(opts = {})
Creates a new instance of the OvirtSDK4::BlockStatistic class.
1123 1124 1125 1126 |
# File 'lib/ovirtsdk4/types.rb', line 1123 def initialize(opts = {}) super(opts) self.statistics = opts[:statistics] end |
Instance Method Details
- (Array<Statistic>) statistics
Returns the value of the statistics
attribute.
1093 1094 1095 |
# File 'lib/ovirtsdk4/types.rb', line 1093 def statistics return @statistics end |
- (Object) statistics=(list)
Sets the value of the statistics
attribute.
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
# File 'lib/ovirtsdk4/types.rb', line 1101 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 |