Method: Main::GetoptLong#terminate
- Defined in:
- lib/main/getoptlong.rb
#terminate ⇒ Object
Termintate option processing.
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/main/getoptlong.rb', line 229 def terminate return nil if @status == STATUS_TERMINATED raise RuntimeError, "an error has occured" if @error != nil @status = STATUS_TERMINATED @non_option_arguments.reverse_each do |argument| @argv.unshift(argument) end @canonical_names = nil @argument_flags = nil @rest_singles = nil @non_option_arguments = nil return self end |