Method: Cog::DSL::Cogfile#initialize

Defined in:
lib/cog/dsl/cogfile.rb

#initialize(config, path, opt = {}) ⇒ Cogfile

Initialize with an instance of Config

Parameters:

  • config (Config)

    the object which will be configured by this Cogfile

  • path (String)

    path to the cogfile

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

    a customizable set of options

Options Hash (opt):

  • :project (Boolean) — default: false

    is this the project cogfile?

  • :plugin_path_only (Boolean) — default: false

    only process plugin_path calls in the given cogfile

  • :plugin (Plugin) — default: nil

    indicate that the cogfile is for the given plugin



17
18
19
20
21
22
23
24
25
26
# File 'lib/cog/dsl/cogfile.rb', line 17

def initialize(config, path, opt={})
  @cogfile_context = {
    :config => config,
    :cogfile_path => path,
    :cogfile_dir => File.dirname(path),
    :project => opt[:project],
    :plugin_path_only => opt[:plugin_path_only],
    :plugin => opt[:plugin],
  }
end