desc "preview"
task :preview do
puts "preview"
end
desc 'want to say hello'
task :hello , [:name, :from] => :preview do |t, args|
puts "hello world, #{args[:name]} from #{args[:from]}!"
end
task :default => :hello
desc "preview"
task :preview do
puts "preview"
end
desc 'want to say hello'
task :hello , [:name, :from] => :preview do |t, args|
puts "hello world, #{args[:name]} from #{args[:from]}!"
end
task :default => :hello
转载于:https://www.cnblogs.com/buhaiqing/archive/2012/11/19/2776929.html