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.
16298 16299 16300 16301 16302 |
# File 'lib/ovirtsdk4/types.rb', line 16298 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.
16307 16308 16309 16310 16311 |
# File 'lib/ovirtsdk4/types.rb', line 16307 def ==(other) super && @bytes == other.bytes && @period == other.period end |
#bytes ⇒ Integer
Returns the value of the bytes
attribute.
16255 16256 16257 |
# File 'lib/ovirtsdk4/types.rb', line 16255 def bytes @bytes end |
#bytes=(value) ⇒ Object
Sets the value of the bytes
attribute.
16264 16265 16266 |
# File 'lib/ovirtsdk4/types.rb', line 16264 def bytes=(value) @bytes = value end |
#hash ⇒ Object
Generates a hash value for this object.
16316 16317 16318 16319 16320 |
# File 'lib/ovirtsdk4/types.rb', line 16316 def hash super + @bytes.hash + @period.hash end |
#period ⇒ Integer
Returns the value of the period
attribute.
16273 16274 16275 |
# File 'lib/ovirtsdk4/types.rb', line 16273 def period @period end |
#period=(value) ⇒ Object
Sets the value of the period
attribute.
16282 16283 16284 |
# File 'lib/ovirtsdk4/types.rb', line 16282 def period=(value) @period = value end |