Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 549 Bytes

File metadata and controls

43 lines (27 loc) · 549 Bytes

Clipar

Get command line paramenters on your code easily. Treat them as methods of an object

Installation

Add this line to your application's Gemfile:

gem 'clipar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install clipar

Usage

If you want to pass values to your code from command line like

foo=bar cucumber

You can do this with CLIPar:

require 'clipar'

cli = CLIPar.new
# to get the value of foo
cli.foo
# => "bar"

# to ask if foo param was defined
cli.foo?
# => true