buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam George <>
Subject Re: Correct Use of the 'tap' Method
Date Thu, 23 May 2013 17:05:14 GMT
Alex Boisvert <alex.boisvert@...> writes:

> Actually, the behavior of task ... do is to enhance the task.
> For instance, if you have a Rakefile or Buildfile with,
> task :foo do
>   puts 'foo1'
> end
> task :foo do
>   puts 'foo2'
> end
> and run rake foo, you'd get:
> foo1
> foo2

Thanks, Alex.

This corresponds with my original understanding, which is why I was confused
in the first place.

If "task :foo do ..." enhances the "foo" task successfully, then why does
"task :compile do ..." seemingly not run in addition to the original
"compile" task?

Maybe the problem is to do with my expectations of enhancement.  The
impression I have is that it's basically like overriding a method from a
super class but also calling super.method(args) as part of the overridden
method to extend the functionality rather than redefine it.  Please correct
me if I'm wrong about this.

Thanks again,


View raw message