Highline – Ruby Gem

July 5, 2008

HighLine is about…

Saving time.

Command line interfaces are meant to be easy. So why shouldn’t building them be easy, too? HighLine provides a solid toolset to help you get the job done cleanly so you can focus on the real task at hand, your task.

Clean and intuitive design.

Want to get a taste for how HighLine is used? Take a look at this simple example, which asks a user for a zip code, automatically does validation, and returns the result:

Code:

require “highline/import”

zipcode = ask(”Zip?  “) { |zip| zip.validate = /\A\d{5}(?:-?\d{4})?\Z/ }

Hassle-free Installation.

Installation is easy via RubyGems. Simply enter the command:

linux :   sudo gem install highline

Windows:  gem install highline

and you’ll be on your way! Of course, manual installation is an option, too.

For more details http://highline.rubyforge.org/

http://highline.rubyforge.org/svn/trunk/highline/examples/

Leave a Reply