Exception: GLI::MissingRequiredOptionsException

Inherits:
BadCommandOptionsOrArguments show all
Defined in:
lib/gli/exceptions.rb

Instance Attribute Summary

Attributes inherited from BadCommandOptionsOrArguments

#command_in_context

Instance Method Summary collapse

Methods inherited from BadCommandLine

#exit_code

Methods included from StandardException

#exit_code

Constructor Details

#initialize(command, missing_required_options) ⇒ MissingRequiredOptionsException

Returns a new instance of MissingRequiredOptionsException.



91
92
93
94
95
# File 'lib/gli/exceptions.rb', line 91

def initialize(command,missing_required_options)
  message = "#{command.name} requires these options: "
  required_options = missing_required_options.sort.map(&:name).join(", ")
  super(message + required_options,command)
end