Class: OvirtSDK4::Package

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 = {}) ⇒ Package

Creates a new instance of the OvirtSDK4::Package 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):

  • :name (String)

    The value of attribute name.



13087
13088
13089
13090
# File 'lib/ovirtsdk4/types.rb', line 13087

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

Instance Method Details

#==(other) ⇒ Object

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



13095
13096
13097
13098
# File 'lib/ovirtsdk4/types.rb', line 13095

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

#hashObject

Generates a hash value for this object.



13103
13104
13105
13106
# File 'lib/ovirtsdk4/types.rb', line 13103

def hash
  super +
  @name.hash
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


13064
13065
13066
# File 'lib/ovirtsdk4/types.rb', line 13064

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


13073
13074
13075
# File 'lib/ovirtsdk4/types.rb', line 13073

def name=(value)
  @name = value
end