Created
July 26, 2014 00:21
-
-
Save kavinderd/de6b073d1aa366321df2 to your computer and use it in GitHub Desktop.
highline example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -n | |
require 'highline/import' | |
loop do | |
cmd = ask("Enter command: ", %w{save sample load reset quit}) do |q| | |
q.readline = true | |
end | |
say("Executing \"#{cmd}\"...") | |
break if cmd == "quit" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment