# File lib/rake/inetmgrtask.rb, line 8
def initialize(name, *args, &block)
@block = block
args = args.insert(0, name)
define name, args
end
Public Instance Methods
call_task_block(obj)click to toggle source
# File lib/rake/inetmgrtask.rb, line 21
def call_task_block(obj)
if !@block.nil?
if @block.arity == 1
@block.call(obj)
else
@block.call(obj, @task_args)
end
end
end
define(name, args)click to toggle source
# File lib/rake/inetmgrtask.rb, line 14
def define(name, args)
task *args do |task, task_args|
@task_args = task_args
execute name.to_s
end
end