lab 21 More Structure

Goals

Now add a Rakefile 01

Let’s add a Rakefile to our repository. The following one will do nicely.

File: Rakefile

#!/usr/bin/ruby -wKU

task :default => :run

task :run do
  require './lib/hello'
end

Add and commit the change.

Execute:

git add Rakefile
git commit -m "Added a Rakefile."

You should be able to use Rake to run your hello program now.

Execute:

rake

Output:

$ rake
Hello, World!

Table of Contents