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.



67
68
69
70
# File 'lib/cl/errors.rb', line 67

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