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.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :percent (Integer)

    The value of attribute percent.



8922
8923
8924
8925
# File 'lib/ovirtsdk4/types.rb', line 8922

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.



8930
8931
8932
8933
# File 'lib/ovirtsdk4/types.rb', line 8930

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

#hashObject

Generates a hash value for this object.



8938
8939
8940
8941
# File 'lib/ovirtsdk4/types.rb', line 8938

def hash
  super +
  @percent.hash
end

#percentInteger

Returns the value of the percent attribute.

Returns:

  • (Integer)


8899
8900
8901
# File 'lib/ovirtsdk4/types.rb', line 8899

def percent
  @percent
end

#percent=(value) ⇒ Object

Sets the value of the percent attribute.

Parameters:

  • value (Integer)


8908
8909
8910
# File 'lib/ovirtsdk4/types.rb', line 8908

def percent=(value)
  @percent = value
end