buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: question about recursive_task
Date Thu, 31 Jul 2008 17:50:13 GMT
On Thu, Jul 31, 2008 at 1:37 AM, Ittay Dror <ittay.dror@gmail.com> wrote:
> Hi,
>
> Looking at the code of 'recursive_task', it has this code:
> 'parent.task(task_name).enhance [task] if parent'.
>
> This seems to mean to me that when the parent task is invoked, it will
> invoke this task, not that when this task is invoked, it will invoke all
> children.

recursive_task doesn't really do anything interesting, it doesn't hide
a complex algorithm, or abstract something that could change over
time.  Its sole purpose to help identify, when working with the source
code, which tasks are recursive.  The compile task is recursive,
invoking the compile task will invoke all its children, recursively.

Assaf

>
> Putting it in other words, if I want to use an extension in the form:
>
> define 'foo' do
>  extend MyExtension
>
>  define 'bar' do  ...
>  end
> end
>
> (That is, it is called only in one project)
>
> Then if I call foo:my_recursive_task, will it call foo:bar:my_recursive
> task?
>
> Thanks,
> Ittay
>
>
> --
> --
> Ittay Dror <ittay.dror@gmail.com>
>
>
>

Mime
View raw message