#
env_var
Optional
Defines an environment variable. This is purely decorative for the --help
text.
title 'API Tools'
env_var 'API_KEY', 'Your API key'
action 'connect' do
api_key = ENV['API_KEY']
abort 'Please provide an API_KEY' unless api_key
say 'Connecting...'
end
$ run --help
API Tools
Usage:
run connect
run (--help | -h)
Options:
--help, -h
Show this message
Environment Variables:
API_KEY
Your API key
$ run connect
Please provide an API_KEY