#67 ✓resolved
bahuvrihi

tasc declaration syntax

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

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

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A framework for making configurable, file-based tasks and workflows.

People watching this ticket

Tags

Pages