Skip to content

Instantly share code, notes, and snippets.

@lilliealbert
Created May 31, 2013 21:41
Show Gist options
  • Save lilliealbert/5688197 to your computer and use it in GitHub Desktop.
Save lilliealbert/5688197 to your computer and use it in GitHub Desktop.
begin
print "list> "
@input = gets.chomp
puts @input
if @input =~ /^add/
@input.sub!(/add /, "")
Task.add(@input)
elsif @input == "list"
Task.list.each {|task| p task }
elsif @input =~ /^delete/
@input.sub!(/delete /, "")
Task.delete(@input)
elsif @input =~ /^complete/
@input.sub!(/complete /, "")
Task.complete(@input)
elsif @input == "help"
help
end
end until @input == "quit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment