bin/room in room-0.1.0 vs bin/room in room-0.1.1
- old
+ new
@@ -1,9 +1,11 @@
#!/usr/bin/env ruby
require "rubygems"
require "optparse"
+require "readline"
+require "highline"
# for testing inside gem dir
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require "room"
@@ -26,10 +28,16 @@
reload!
3.times { Printer.puts }
Room.do "look"
-while line = Readline.readline('> ', true)
+loop do
+ line = if $secretive
+ $secretive = false
+ HighLine.new.ask("> ") { |q| q.echo = false }
+ else
+ Readline.readline("> ", true)
+ end
Room.do line.chomp
end
Printer.puts "\nThe world is your cantaloupe."