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
-
bahuvrihi July 26th, 2008 @ 07:47 AM
The bare 'tasc' and 'config' methods could be put into a special module that you could include, if desired... keeping the method space clear.
-
bahuvrihi July 26th, 2008 @ 03:31 PM
- State changed from new to resolved
- Assigned user set to bahuvrihi
(from [84ad061cac8fcd24cf31afa8439812f4970b55bc]) Added tasc declaration syntax [#67 state:resolved responsible:bahuvrihi]
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.
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.