Method: Runcible::Resources::Repository.unit_copy

Defined in:
lib/runcible/resources/repository.rb

.unit_copy(destination_repo_id, source_repo_id, optional = {}) ⇒ RestClient::Response

Copies units from one repository to another

Parameters:

  • destination_repo_id (String)

    the id of the destination repository

  • source_repo_id (String)

    the id of the source repository

  • optional (Hash) (defaults to: {})

    container for all optional parameters

Returns:

  • (RestClient::Response)


138
139
140
141
142
# File 'lib/runcible/resources/repository.rb', line 138

def self.unit_copy(destination_repo_id, source_repo_id, optional={})
  required = required_params(binding.send(:local_variables), binding, ["destination_repo_id"])
  call(:post, "#{path(destination_repo_id)}actions/associate/",
       :payload => { :required => required, :optional => optional })
end