libraries/oneview_backend.rb
# Given the calling object and its data, create the methods on the object according
# to the data that has been retrieved. Various types of data can be returned so the method
# checks the type to enure that the necessary methods are configured correctly.
#
# @param [OneviewResourceProbe|OneviewResource] object The object on which the methods should be created
# @param [Hash] data The data from which the methods should be created
Given the calling object and its data, create the methods on the object according
to the data that has been retrieved. Various types of data can be returned so the method
checks the type to enure that the necessary methods are configured correctly.
Given the calling object and its data create the methods on the object according to the data that has been retrieved . Various types of data can be returned so the method checks the type to enure that the necessary methods are configured correctly .
def create_methods(object, data)
    case data.class.to_s
    when 'Hash'
      data.each do |key, value|
        create_method(object, key, value)
      end
    end
  end
def create_methods ( object , data ) case data . class . to_s when 'Hash' data . each do | key , value | create_method ( object , key , value ) end end end
Given the calling object and its data, create the methods on the object according
to the data that has been retrieved.
Given the calling object and its data create the methods on the object according to the data that has been retrieved .
# Check the type of data as this affects the setup of the methods
object
<not_specific>
data
<not_specific>
<not_specific>
data The data from which the methods should be created
data The data from which the methods should be created