Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 28 lines (22 sloc) 0.531 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
$LOAD_PATH.unshift "../lib"
require 'rubygems'
require 'wee'

class CheeseTask < Wee::Task
  def go
    begin choose_cheese end until confirm_cheese
    inform_cheese
  end

  def choose_cheese
    @cheese = nil
    while @cheese.nil?
      @cheese = choose_from %w(Greyerzer Tilsiter Sbrinz), "What's your favorite Cheese?"
    end
  end

  def confirm_cheese
    confirm "Is #{@cheese} your favorite cheese?"
  end

  def inform_cheese
    inform "Your favorite is #{@cheese}."
  end
end

Wee.runcc(CheeseTask) if __FILE__ == $0
Something went wrong with that request. Please try again.