Class: OvirtSDK4::Rate
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#bytes ⇒ Integer
Returns the value of the
bytesattribute. -
#bytes=(value) ⇒ Object
Sets the value of the
bytesattribute. -
#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
periodattribute. -
#period=(value) ⇒ Object
Sets the value of the
periodattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Rate
Creates a new instance of the OvirtSDK4::Rate class.
17400 17401 17402 17403 17404 |
# File 'lib/ovirtsdk4/types.rb', line 17400 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.
17409 17410 17411 17412 17413 |
# File 'lib/ovirtsdk4/types.rb', line 17409 def ==(other) super && @bytes == other.bytes && @period == other.period end |
#bytes ⇒ Integer
Returns the value of the bytes attribute.
17357 17358 17359 |
# File 'lib/ovirtsdk4/types.rb', line 17357 def bytes @bytes end |
#bytes=(value) ⇒ Object
Sets the value of the bytes attribute.
17366 17367 17368 |
# File 'lib/ovirtsdk4/types.rb', line 17366 def bytes=(value) @bytes = value end |
#hash ⇒ Object
Generates a hash value for this object.
17418 17419 17420 17421 17422 |
# File 'lib/ovirtsdk4/types.rb', line 17418 def hash super + @bytes.hash + @period.hash end |
#period ⇒ Integer
Returns the value of the period attribute.
17375 17376 17377 |
# File 'lib/ovirtsdk4/types.rb', line 17375 def period @period end |
#period=(value) ⇒ Object
Sets the value of the period attribute.
17384 17385 17386 |
# File 'lib/ovirtsdk4/types.rb', line 17384 def period=(value) @period = value end |