Permalink
Browse files

Planning is unvisited. ✌️

  • Loading branch information...
1 parent 65237f5 commit c3f4c9f06425d8a63cbbbdd148d88cf55741c88f @dylanegan committed Aug 4, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 test.rb
View
@@ -6,13 +6,14 @@
next unless line[/^\* /]
total += 1
- unvisited += 1 if line[/~~/]
+ unvisited += 1 if line[/~~/] || destination[/TBD|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec/]
end
end
-if (unvisited / total * 100) > 50.0
- puts "The only thing that can keep you from succeeding is yourself."
+percentage = (unvisited / total * 100)
+if percentage > 50.0
+ puts "The only thing that can keep you from succeeding is yourself. (#{"%.2f" % percentage}% unvisited)"
exit 1
end
-puts "To travel is to discover that everyone is wrong about other countries."
+puts "To travel is to discover that everyone is wrong about other countries. (#{"%.2f" % percentage}% unvisited)"

0 comments on commit c3f4c9f

Please sign in to comment.