Module: Ghostbuster::Rake

Defined in:
lib/ghostbuster/rake.rb

Class Method Summary collapse

Class Method Details

.include_rake_tasks(opts = {}) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/ghostbuster/rake.rb', line 9

def self.include_rake_tasks(opts = {})
  opts[:path]      ||= './ghost'
  opts[:task_name] ||= :"test:ghostbuster"
  desc "Run ghostbuster tasks"
  task opts[:task_name] do
    Ghostbuster.new(opts[:path]).run
  end
end

.included(o) ⇒ Object



3
4
5
6
7
8
# File 'lib/ghostbuster/rake.rb', line 3

def self.included(o)
  o.class_eval do
    include Rake::DSL if defined? Rake::DSL
    Ghostbuster::Rake.include_rake_tasks
  end
end