Class: PBM::Commands::Exit

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

Instance Method Summary collapse

Constructor Details

#initialize(interpreter) ⇒ Exit

Returns a new instance of Exit.



4
5
6
# File 'lib/pbm/commands/exit.rb', line 4

def initialize(interpreter)
  @interpreter = interpreter
end

Instance Method Details

#descriptionObject



8
9
10
# File 'lib/pbm/commands/exit.rb', line 8

def description
  'exit - closes this application'
end

#runObject



12
13
14
15
# File 'lib/pbm/commands/exit.rb', line 12

def run
  @interpreter.running = false
  'Closing.'
end