Class: OvirtSDK4::Rate
- 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. -
#bytes ⇒ Integer
Returns the value of the
bytes
attribute. -
#bytes=(value) ⇒ Object
Sets the value of the
bytes
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ Rate
constructor
Creates a new instance of the Rate class.
-
#period ⇒ Integer
Returns the value of the
period
attribute. -
#period=(value) ⇒ Object
Sets the value of the
period
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Rate
Creates a new instance of the OvirtSDK4::Rate class.
17130 17131 17132 17133 17134 |
# File 'lib/ovirtsdk4/types.rb', line 17130 def initialize(opts = {}) super(opts) self.bytes = opts[:bytes] self.period = opts[:period] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
17139 17140 17141 17142 17143 |
# File 'lib/ovirtsdk4/types.rb', line 17139 def ==(other) super && @bytes == other.bytes && @period == other.period end |
#bytes ⇒ Integer
Returns the value of the bytes
attribute.
17087 17088 17089 |
# File 'lib/ovirtsdk4/types.rb', line 17087 def bytes @bytes end |
#bytes=(value) ⇒ Object
Sets the value of the bytes
attribute.
17096 17097 17098 |
# File 'lib/ovirtsdk4/types.rb', line 17096 def bytes=(value) @bytes = value end |
#hash ⇒ Object
Generates a hash value for this object.
17148 17149 17150 17151 17152 |
# File 'lib/ovirtsdk4/types.rb', line 17148 def hash super + @bytes.hash + @period.hash end |
#period ⇒ Integer
Returns the value of the period
attribute.
17105 17106 17107 |
# File 'lib/ovirtsdk4/types.rb', line 17105 def period @period end |
#period=(value) ⇒ Object
Sets the value of the period
attribute.
17114 17115 17116 |
# File 'lib/ovirtsdk4/types.rb', line 17114 def period=(value) @period = value end |