Method: R10K::Source::Base#initialize

Defined in:
lib/r10k/source/base.rb

#initialize(name, basedir, options = {}) ⇒ Base

Initialize the given source.

Parameters:

  • name (String)

    The identifier for this source.

  • basedir (String)

    The base directory where the generated environments will be created.

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

    An additional set of options for this source. The semantics of this hash may depend on the source implementation.

Options Hash (options):

  • :prefix (Boolean, String)

    If a String this becomes the prefix. If true, will use the source name as the prefix. All sources should respect this option. Defaults to false for no environment prefix.

Since:

  • 1.3.0



29
30
31
32
33
34
# File 'lib/r10k/source/base.rb', line 29

def initialize(name, basedir, options = {})
  @name    = name
  @basedir = Pathname.new(basedir).cleanpath.to_s
  @prefix  = options.delete(:prefix)
  @options = options
end