Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
use a case statement for input instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nickserv committed May 27, 2012
1 parent be4d040 commit be259c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tracking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,16 @@ def self.help
if ARGV.length == 0
List.print
else
if ARGV[0] == "clear"
case ARGV[0]
when "clear"
puts "list cleared"
List.clear
elsif ARGV[0] == "rm"
when "rm"
List.remove
List.print
elsif ARGV[0] == "edit"
when "edit"
List.edit
elsif ARGV[0] == "help"
when "help"
List.help
else
List.add ARGV.join(" ")
Expand Down

0 comments on commit be259c1

Please sign in to comment.