Class: OvirtSDK4::Option

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

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

  • :type (String)

    The value of attribute type.

  • :value (String)

    The value of attribute value.


13330
13331
13332
13333
13334
13335
# File 'lib/ovirtsdk4/types.rb', line 13330

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

Instance Method Details

#==(other) ⇒ Object

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


13340
13341
13342
13343
13344
13345
# File 'lib/ovirtsdk4/types.rb', line 13340

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

#hashObject

Generates a hash value for this object.


13350
13351
13352
13353
13354
13355
# File 'lib/ovirtsdk4/types.rb', line 13350

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

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

13267
13268
13269
# File 'lib/ovirtsdk4/types.rb', line 13267

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

13276
13277
13278
# File 'lib/ovirtsdk4/types.rb', line 13276

def name=(value)
  @name = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)

13285
13286
13287
# File 'lib/ovirtsdk4/types.rb', line 13285

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)

13294
13295
13296
# File 'lib/ovirtsdk4/types.rb', line 13294

def type=(value)
  @type = value
end

#valueString

Returns the value of the value attribute.

Returns:

  • (String)

13303
13304
13305
# File 'lib/ovirtsdk4/types.rb', line 13303

def value
  @value
end

#value=(value) ⇒ Object

Sets the value of the value attribute.

Parameters:

  • value (String)

13312
13313
13314
# File 'lib/ovirtsdk4/types.rb', line 13312

def value=(value)
  @value = value
end