Module: TTY::Exit::Registry
- Defined in:
- lib/tty/exit/registry.rb
Class Method Summary collapse
-
.exits ⇒ Object
private
A storage for custom exit codes.
-
.register_exit(name, code, message) ⇒ Object
Register a custom exit code.
Class Method Details
.exits ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A storage for custom exit codes
9 10 11 |
# File 'lib/tty/exit/registry.rb', line 9 def self.exits @exits ||= {} end |
.register_exit(name, code, message) ⇒ Object
Register a custom exit code
20 21 22 23 |
# File 'lib/tty/exit/registry.rb', line 20 def self.register_exit(name, code, ) exits[name] = {code: code, message: } exits[code] = {code: code, message: } end |