calling a task in rant at any time (not just as a prerequisite)

Discussion in 'Ruby' started by bwv549, Jul 28, 2006.

  1. bwv549

    bwv549 Guest

    In rant, we call a task by denoting it as a dependancy:

    task :test => [:build] do # calls :build before :test
    -whatever-
    end

    How do you call a task at the end of (or inside) a block?

    task :myaction do
    -some action-
    end

    task :eek:theraction do
    -some stuff here-
    *** how to call :myaction here? **
    end (** or here? **)

    Thanks
     
    bwv549, Jul 28, 2006
    #1
    1. Advertising

  2. In Rake, I put the contents of the :myaction
    task into a method. Then invoke the method
    from either task.

    Beats the hell out of make or ant...

    bwv549 wrote:
    > In rant, we call a task by denoting it as a dependancy:
    >
    > task :test => [:build] do # calls :build before :test
    > -whatever-
    > end
    >
    > How do you call a task at the end of (or inside) a block?
    >
    > task :myaction do
    > -some action-
    > end
    >
    > task :eek:theraction do
    > -some stuff here-
    > *** how to call :myaction here? **
    > end (** or here? **)
    >
    > Thanks
    >
    >
     
    Eric Armstrong, Jul 28, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John 3:16

    Prerequisite for asp.net browsing... ?

    John 3:16, Sep 12, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    576
    John 3:16
    Sep 13, 2005
  2. Tertius

    tk prerequisite

    Tertius, Jul 12, 2003, in forum: Python
    Replies:
    2
    Views:
    336
    Tertius
    Jul 20, 2003
  3. Timothy Hunter

    RMagick prerequisite changes

    Timothy Hunter, Jan 25, 2007, in forum: Ruby
    Replies:
    0
    Views:
    114
    Timothy Hunter
    Jan 25, 2007
  4. Greg Hauptmann
    Replies:
    4
    Views:
    203
    Stefano Crocco
    Feb 7, 2009
  5. Sean
    Replies:
    2
    Views:
    92
Loading...

Share This Page