Module: Amp::Core::RepositoryLoading::InstanceMethods

Defined in:
lib/amp-core/command_ext/repository_loading.rb

Constant Summary collapse

DEFAULT_OPTS =
{:create => false}

Instance Method Summary collapse

Instance Method Details

#repository(repo_opts = DEFAULT_OPTS) ⇒ Object



13
14
15
16
17
18
# File 'lib/amp-core/command_ext/repository_loading.rb', line 13

def repository(repo_opts=DEFAULT_OPTS)
  repo_opts = DEFAULT_OPTS.merge(repo_opts)
  path = options[:repository]
  # pick a repo based on this
  return Repositories.pick(options, path, repo_opts[:create])
end