Class: Okay::SimpleOpts
- Defined in:
- lib/okay/simple_opts.rb
Overview
An OptionParser wrapper providing a few convenience functions.
Instance Method Summary collapse
-
#initialize(*args, defaults: nil) ⇒ SimpleOpts
constructor
A new instance of SimpleOpts.
- #parse(args) ⇒ Object
- #simple(*args) ⇒ Object
Constructor Details
#initialize(*args, defaults: nil) ⇒ SimpleOpts
Returns a new instance of SimpleOpts.
10 11 12 13 |
# File 'lib/okay/simple_opts.rb', line 10 def initialize(*args, defaults: nil) super(*args) @okay_options = defaults || {} end |
Instance Method Details
#parse(args) ⇒ Object
26 27 28 29 |
# File 'lib/okay/simple_opts.rb', line 26 def parse(args) parse!(args.dup) @okay_options end |