Class: Cl::RequiredsOpts

Inherits:
OptionError
  • Object
show all
Defined in:
lib/cl/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ RequiredsOpts

Returns a new instance of RequiredsOpts.


33
34
35
36
# File 'lib/cl/errors.rb', line 33

def initialize(opts)
  opts = opts.map { |alts| alts.map { |alt| Array(alt).join(' and ') }.join(', or ' ) }
  super(:requires_opts, opts.join('; '))
end