Class: OvirtSDK4::Property

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

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

  • :value (String)

    The value of attribute value.



14620
14621
14622
14623
14624
# File 'lib/ovirtsdk4/types.rb', line 14620

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

Instance Method Details

#==(other) ⇒ Object

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



14629
14630
14631
14632
14633
# File 'lib/ovirtsdk4/types.rb', line 14629

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

#hashObject

Generates a hash value for this object.



14638
14639
14640
14641
14642
# File 'lib/ovirtsdk4/types.rb', line 14638

def hash
  super +
  @name.hash +
  @value.hash
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


14577
14578
14579
# File 'lib/ovirtsdk4/types.rb', line 14577

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


14586
14587
14588
# File 'lib/ovirtsdk4/types.rb', line 14586

def name=(value)
  @name = value
end

#valueString

Returns the value of the value attribute.

Returns:

  • (String)


14595
14596
14597
# File 'lib/ovirtsdk4/types.rb', line 14595

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)


14604
14605
14606
# File 'lib/ovirtsdk4/types.rb', line 14604

def value=(value)
  @value = value
end