Class: OvirtSDK4::MemoryOverCommit

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ MemoryOverCommit

Creates a new instance of the OvirtSDK4::MemoryOverCommit class.

Options Hash (opts):

  • :percent (Integer)

    The value of attribute percent.



9863
9864
9865
9866
# File 'lib/ovirtsdk4/types.rb', line 9863

def initialize(opts = {})
  super(opts)
  self.percent = opts[:percent]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



9871
9872
9873
9874
# File 'lib/ovirtsdk4/types.rb', line 9871

def ==(other)
  super &&
  @percent == other.percent
end

#hashObject

Generates a hash value for this object.



9879
9880
9881
9882
# File 'lib/ovirtsdk4/types.rb', line 9879

def hash
  super +
  @percent.hash
end

#percentInteger

Returns the value of the percent attribute.



9840
9841
9842
# File 'lib/ovirtsdk4/types.rb', line 9840

def percent
  @percent
end

#percent=(value) ⇒ Object

Sets the value of the percent attribute.



9849
9850
9851
# File 'lib/ovirtsdk4/types.rb', line 9849

def percent=(value)
  @percent = value
end