Class: Pry::Shell::Command
- Inherits:
-
Object
- Object
- Pry::Shell::Command
- Defined in:
- lib/pry/shell/command.rb
Constant Summary collapse
- EXIT_COMMANDS =
%w[exit !!!].freeze
- DISC_COMMAND =
"\\m"
- DISC_FALLBACK =
"whereami"
Class Method Summary collapse
Class Method Details
.execute(client, string) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pry/shell/command.rb', line 10 def self.execute(client, string) case string when *EXIT_COMMANDS Shell.registry.remove(client) && string when DISC_COMMAND Shell.registry.disconnect(client) && DISC_FALLBACK else string end end |