class Gitload::Config::DSL

Attributes

repos[R]

Public Class Methods

new(config) click to toggle source
# File lib/gitload/config.rb, line 69
def initialize config
  @config = config
  @repos = RepoChain.new @config
end

Public Instance Methods

cache() click to toggle source
# File lib/gitload/config.rb, line 78
def cache
  @config.cache = true
end
chain(repos = [], options = {}) click to toggle source
# File lib/gitload/config.rb, line 74
def chain repos = [], options = {}
  RepoChain.new @config, repos, options
end
clone_url_type(type, &block) click to toggle source
# File lib/gitload/config.rb, line 93
def clone_url_type type, &block

  previous_type = @config.clone_url_type
  @config.clone_url_type = type

  if block
    instance_eval &block
    @config.clone_url_type = previous_type
  end
end
into(dest, &block)
Alias for: root
method_missing(symbol, *args, &block) click to toggle source
Calls superclass method
# File lib/gitload/config.rb, line 108
def method_missing symbol, *args, &block
  if Sources.sources.key? symbol
    Sources.sources[symbol].source *args.unshift(@config), &block
  else
    super symbol, *args, &block
  end
end
root(dest, &block) click to toggle source
# File lib/gitload/config.rb, line 82
def root dest, &block

  previous_root = @config.root
  @config.root = dest

  if block
    instance_eval &block
    @config.root = previous_root
  end
end
Also aliased as: into