Joel VanderWerf wrote:
> Alex Wayne wrote:
>> by refactoring the common code out.
>> Thanks for the help.
> Not sure I understand, but why not just do what you said: define a
> method that handles the common work?
> 
> task :to_a do |name|
>    convert(name)
> end
> 
> task :to_b do |name|
>    convert(name)
> end
> 
> def convert name
>    puts "converting #{name}"
> end

*Slaps forehead*.  For some reason, I assumed that is not how a rake 
task works.  I guess I need to remember its just plain old ruby with 
some syntax sugar, right?
-- 
Posted via http://www.ruby-forum.com/.