Parent

Methods

Class/Module Index [+]

Quicksearch

Warbler::Task

Warbler Rake task. Allows defining multiple configurations inside the same Rakefile by using different task names.

Constants

COPY_PROC

Attributes

config[RW]
name[RW]

Task name

verbose[RW]

Whether to print a line when a file or directory task is declared; helps to see what is getting included

Public Class Methods

new(name = :war, config = nil, tasks = :define_tasks) click to toggle source
# File lib/warbler/task.rb, line 36
def initialize(name = :war, config = nil, tasks = :define_tasks)
  @name   = name
  @config = config
  if @config.nil? && File.exists?(Config::FILE)
    @config = eval(File.open(Config::FILE) {|f| f.read})
  end
  @config ||= Config.new
  unless @config.kind_of? Config
    warn "War::Config not provided by override in initializer or #{Config::FILE}; using defaults"
    @config = Config.new
  end
  yield self if block_given?
  send tasks
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.