Search Results

Search found 2 results on 1 pages for 'pandawood'.

Page 1/1 | 1 

  • Why is Rake not able to invoke multiple tasks consecutively?

    - by PandaWood
    I have a Rake task which I have simplified below. I'm using Ruby 1.9 on Windows. Perhaps you would like to guess the outcome of calling the Rake task "list_all_levels" below? It should be: "Hello level 1" "Hello level 2" "Hello level 3" But for reasons unknown to me, it prints only "Hello level 1" and then stops. That is, it always invokes only the first task. If I change the first line to pass the arg "42", it would print "Hello level 42" and then stop. I'm wondering why does it not invoke the task 3 times and print all 3 lines? And is there any way to get it to work how I would expect? task :list_all_levels => [] do Rake::Task[:list].invoke 1 Rake::Task[:list].invoke 2 Rake::Task[:list].invoke 3 end task :list, [:level] => [] do |t, args| puts "Hello level #{args.level}" end

    Read the article

  • Writing a jquery plugin in coffeescript - how to get "(function($)" and "(jQuery)"?

    - by PandaWood
    I am writing a jquery plugin in coffeescript but am not sure how to get the function wrapper part right. My coffeescript starts with this line: $.fn.extend({ Which creates the javascript with a function wrapper: (function() { $.fn.extend({ but I want a '$' passed in like this: (function($) { $.fn.extend({ Similar for the ending I have... nothing in particular in coffeescript. I get this in javascript: })(); But would like this: })(jQuery); Does anyone know how to achieve this with the coffeescript compiler? Or what is the best way to get this done within coffeescript?

    Read the article

1