Class: OvirtSDK4::Sso

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

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

  • :methods (Array<Method>, Array<Hash>)

    The values of attribute methods.


19670
19671
19672
19673
# File 'lib/ovirtsdk4/types.rb', line 19670

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

Instance Method Details

#==(other) ⇒ Object

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


19678
19679
19680
19681
# File 'lib/ovirtsdk4/types.rb', line 19678

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

#hashObject

Generates a hash value for this object.


19686
19687
19688
19689
# File 'lib/ovirtsdk4/types.rb', line 19686

def hash
  super +
  @methods.hash
end

#methodsArray<Method>

Returns the value of the methods attribute.

Returns:


19639
19640
19641
# File 'lib/ovirtsdk4/types.rb', line 19639

def methods
  @methods
end

#methods=(list) ⇒ Object

Sets the value of the methods attribute.

Parameters:


19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
# File 'lib/ovirtsdk4/types.rb', line 19648

def methods=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Method.new(value)
      end
    end
  end
  @methods = list
end