Cliprompt

This library provides a simple DSL for managing user interaction in a CLI application. Still under development, but usable already. Check the Changelog to see what is in already.
Features
- manages questions, choices, default values, yes/no values (done)
- makes possible to have env vars set for defaults (done)
Usage
# add in your Gemfile
gem 'cliprompt'
Then in your code
require 'cliprompt'
class Myclass
extend Cliprompt
def initialize
@url = ask "What is the url of Myclass?"
@ssl = ask "Is it using SSL?", 'y/N'
@age = ask "What is the age of the captain?", [22,33,=44,55]
@age = guess 'SOMEVAR', "What is the age of the captain?", [22,33,=44,55]
end
end
Check example.rb for various possible combinations, or run rspec -f d
after all that's also what tests are for.
Contributing
License
Copyrite (c) 2014 - mose - Distributed under MIT license