Skip to content

Instantly share code, notes, and snippets.

@simondean
Created August 19, 2014 22:00
Show Gist options
  • Save simondean/1455fac56f1b0acea927 to your computer and use it in GitHub Desktop.
Save simondean/1455fac56f1b0acea927 to your computer and use it in GitHub Desktop.
# Here is how to create an option/argument with mixlab-cli that can be assigned multiple values
# Hash
option :env,
:description => "Environment variable to pass to Cucumber. Can be specified more than once to set multiple environment variables",
:short => '-n NAME=VALUE',
:long => '--env NAME=VALUE',
:proc =>
lambda do |c|
@env ||= {}
name, value = c.split('=', 2)
@env[name] = value
@env
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment