libraries/resource_providers/image_streamer/api300/artifact_bundle_provider.rb
def load_expected_resources(resource_type, resource_array, add_method = nil)
          resource_array.each do |resource|
            read_only = resource[:read_only] ||= true
            resource = load_resource(resource_type, resource[:name])
            add_method = 'add_' + resource_type.to_s.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase if add_method.nil?
            @item.method(add_method).call(resource, read_only)
          end
        end
# Call the 'add_<resource_type>' methods for based on the resource_type passed in to allow using names
# @param [String, Symbol] resource_type Type of resource to be loaded. e.g., :GoldenImage, :FCNetwork.
# @param [Array] resource_array Array containing the names of the resources and whether they are readonly or not. e.g., [{'DP', false}]
# @param [String] add_method String containing the name of the method which adds the arrays of resources to the artifact bundle.
Call the 'add_' methods for based on the resource_type passed in to allow using names
Call the ' add_ ' methods for based on the resource_type passed in to allow using names
def load_expected_resources(resource_type, resource_array, add_method = nil)
          resource_array.each do |resource|
            read_only = resource[:read_only] ||= true
            resource = load_resource(resource_type, resource[:name])
            add_method = 'add_' + resource_type.to_s.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase if add_method.nil?
            @item.method(add_method).call(resource, read_only)
          end
        end
def load_expected_resources ( resource_type , resource_array , add_method = nil ) resource_array . each do | resource | read_only = resource [ :read_only ] ||= true resource = load_resource ( resource_type , resource [ :name ] ) add_method = 'add_' + resource_type . to_s . gsub ( / ([a-z \d ])([A-Z]) / , '\1_\2' ) . downcase if add_method . nil? @item . method ( add_method ) . call ( resource , read_only ) end end
Call the 'add_<resource_type>' methods for based on the resource_type passed in to allow using names
Call the ' add_<resource_type > ' methods for based on the resource_type passed in to allow using names
resource_type
resource_array
add_method
add_method String containing the name of the method which adds the arrays of resources to the artifact bundle.
add_method String containing the name of the method which adds the arrays of resources to the artifact bundle .