I've been working on a task library, on the surface similiar to Rake,
but generalized for use on a per module level --hence usable anywhere
in one's code. The basic principle of the library is that a TASK IS A
METHOD WITH DEPENDENCIES.

But there's a problem with using a notion like that of Rake's. Since
the dependencies are designated by a list of task names there is no way
to pass parameters to those dependencies and hence tasks can't have
parameters at all. Eg.

  task :t1 => [ :t2 ] do
    ...
  end

  task :t2 do |x|
    ...
  end

Clearly it doesn't work for task t2 to have the parameter x since t1
can't pass a parameter using just a symbol list, [:t2].

Since my premise is that tasks are just methods with dependencies I am
considering an alternative notation.

  def t1
    t2( 'yes' )
    ...
  end

  def t1(a)
    ...
  end

  task :t1, :t2

The question is, can the dependency structure be managed properly with
a notation like this? I'm not sure how. Some of you might recall I
suggested using memoize/cache awhile back, but it was pointed out to me
(by Ara I believe) that the dependencies were not handled properly, due
to DAG issues and the possibility of external calls cutting off the
dependency cycle.

So does any one have any idea how it might be done, or perhaps an
alternative way ot supplying parameters to tasks?

Thanks,
T.