Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

tasc declaration syntax

#67

It would be nice to have a short syntax for declaring tasks, a-la Rake:

# ::manifest blah
tasc :name, {:key => :val} do |*inputs|
  ...
end

# add a code comment that parses special...
# register it as manifest, parse ::manifest line as subject
# and take do || as the process params.  In manifestation,
# look to the subject line for tasc... this will indicate
# the default const_name if unlisted.
module Namespace
  
  # ::manifest desc
  # name documenation 
  Tap::FileTask.tasc :name, {:key => :val, :another => :val} do |*inputs|
    ...
  end

  # potentially you could do something like this too,
  # where the input to tasc is not a hash, but an array
  # of configs.
  Tap::FileTask.tasc :name, 
    config(:con, :fig),                # comment
    [:another, :val, :short => 'a']
  do |*inputs| 
    ...
  end
  
end


module Namespace
  
  # ::manifest desc
  # name documentation
  class Name < Tap::FileTask
    config :con, :fig
  
    def process(*inputs)
      ...
    end
  end
end

Reported by bahuvrihi · July 26th, 2008 @ 07:45 AM

State: resolved
Milestone: none
Assigned to: bahuvrihi bahuvrihi

Activity

  1. bahuvrihi
    bahuvrihi

    The bare 'tasc' and 'config' methods could be put into a special module that you could include, if desired... keeping the method space clear.

    July 26th, 2008 @ 07:47 AM

  2. bahuvrihi
    bahuvrihi
    
    # ::manifest blah
    Name = Task.subclass({}) do |inputs|
    
    end
    
    

    July 26th, 2008 @ 02:24 PM

  3. bahuvrihi
    bahuvrihi
    • State changed from new to resolved
    • Assigned user set to bahuvrihi

    (from [84ad061cac8fcd24cf31afa8439812f4970b55bc]) Added tasc declaration syntax [#67 state:resolved responsible:bahuvrihi]

    http://github.com/bahuvrihi/tap/...

    July 26th, 2008 @ 03:31 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.