Class: Mayl::Commands::Exit

Inherits:
Object
  • Object
show all
Defined in:
lib/mayl/commands/exit.rb

Overview

Public: The Exit command exits the program.

Example

command = Exit.new(env)
command.execute

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Exit

Public: Initializes a new Exit command.

env - the global environment



14
15
# File 'lib/mayl/commands/exit.rb', line 14

def initialize(env)
end

Instance Method Details

#executeObject

Public: Exits the program.

Returns nothing.



20
21
22
# File 'lib/mayl/commands/exit.rb', line 20

def execute
  exit(0)
end