provider/config.rb
# Provides the API object to any type that requires, e.g. for validation
# purposes, such as Api::Resource::HashArray which enforces that the keys
# are necessarily objects defined in the API.
Provides the API object to any type that requires, e.g. for validation
purposes, such as Api::Resource::HashArray which enforces that the keys
are necessarily objects defined in the API.
Provides the API object to any type that requires e . g . for validation purposes such as Api :: Resource :: HashArray which enforces that the keys are necessarily objects defined in the API .
def spread_api(object, api, visited, indent)
      object.instance_variables.each do |var|
        var_value = object.instance_variable_get(var)
        next if visited.include?(var_value)
        visited << var_value
        var_value.consume_api api if var_value.respond_to?(:consume_api)
        spread_api(var_value, api, visited, indent)
      end
    end
def spread_api ( object , api , visited , indent ) object . instance_variables . each do | var | var_value = object . instance_variable_get ( var ) next if visited . include? ( var_value ) visited << var_value var_value . consume_api api if var_value . respond_to? ( :consume_api ) spread_api ( var_value , api , visited , indent ) end end
Provides the API object to any type that requires, e.g.
Provides the API object to any type that requires e . g .
object
<not_specific>
api
<not_specific>
visited
<not_specific>
indent
<not_specific>