Skip to content

Instantly share code, notes, and snippets.

@timoschilling
Last active August 26, 2015 14:27
Show Gist options
  • Select an option

  • Save timoschilling/563c6df6bed0e1511375 to your computer and use it in GitHub Desktop.

Select an option

Save timoschilling/563c6df6bed0e1511375 to your computer and use it in GitHub Desktop.
demo simple rake
#!/usr/bin/env ruby
require "./rake_lib"
require "./test_task"
exec ARGV.first.to_sym
@tasks = {}
def task name, &block
@tasks[name] = block
end
def exec name
@tasks[name].call
end
task :foo do
puts "foo"
end
task :bar do
puts "bar"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment