Class: Bucky::Core::TestCore::ExitHandler

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bucky/core/test_core/exit_handler.rb

Instance Method Summary collapse

Constructor Details

#initializeExitHandler

Returns a new instance of ExitHandler.



11
12
13
# File 'lib/bucky/core/test_core/exit_handler.rb', line 11

def initialize
  @exit_code = 0
end

Instance Method Details

#bucky_exitObject



23
24
25
# File 'lib/bucky/core/test_core/exit_handler.rb', line 23

def bucky_exit
  exit @exit_code
end

#raiseObject



19
20
21
# File 'lib/bucky/core/test_core/exit_handler.rb', line 19

def raise
  @exit_code = 1
end

#resetObject



15
16
17
# File 'lib/bucky/core/test_core/exit_handler.rb', line 15

def reset
  @exit_code = 0
end