Allow `target' recipe keyword to return target

This commit is contained in:
Thibault Jouan
2014-09-25 14:57:27 +00:00
parent eba719941d
commit b11d0b6950
3 changed files with 20 additions and 3 deletions

View File

@@ -26,8 +26,8 @@ module Producer
instance_eval File.read("./#{filepath}.rb"), "#{filepath}.rb"
end
def target(hostname)
env.target ||= hostname
def target(hostname = nil)
if hostname then env.target ||= hostname else env.target end
end
def task(name, *args, &block)