Class: Cl::RequiresOpts
- Inherits:
-
OptionError
- Object
- Cl::RequiresOpts
- Defined in:
- lib/cl/errors.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ RequiresOpts
constructor
A new instance of RequiresOpts.
Constructor Details
#initialize(opts) ⇒ RequiresOpts
Returns a new instance of RequiresOpts.
74 75 76 77 78 |
# File 'lib/cl/errors.rb', line 74 def initialize(opts) msg = opts.size == 1 ? :requires_opt : :requires_opts opts = opts.map { |one, other| "#{one} (required by #{other})" }.join(', ') super(msg, opts) end |