Module: MonkeyDoPatch

Defined in:
lib/monkey_do.rb

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.conf(file) ⇒ Object



9
10
11
12
13
14
# File 'lib/monkey_do.rb', line 9

def self.conf(file)
  MonkeyDo.module_eval {
    raise ArgumentError unless File.exists?(file)
    @conf = file
  }
end

.included(obj) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/monkey_do.rb', line 16

def self.included(obj)
  obj.class_eval { 
    Proc.new {
      namespace :build do
        desc "apply patches and update template files"
        task :patch do
          MonkeyDo.monkey_patch
        end
      end
    }.call
  }
end