Class: ClasslessMud::Commands::Quit
- Inherits:
-
Object
- Object
- ClasslessMud::Commands::Quit
- Defined in:
- lib/classless_mud/commands/quit.rb
Class Method Summary collapse
Class Method Details
.perform(game, player, message) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/classless_mud/commands/quit.rb', line 4 def self.perform game, player, player.puts "Are you sure you want to quit? y/n: " player.on do |response| if response == 'y' || response == 'Y' player.puts "Thanks for playing" player.room.exit self player.close_client end end end |