Class: Cl::RequiredsOpts
- Inherits:
-
OptionError
- Object
- Cl::RequiredsOpts
- Defined in:
- lib/cl/errors.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ RequiredsOpts
constructor
A new instance of RequiredsOpts.
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 |