Exception: Tomo::Testing::MockedExitError

Inherits:
Exception
  • Object
show all
Defined in:
lib/tomo/testing/mocked_exit_error.rb

Overview

rubocop:disable Lint/InheritException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ MockedExitError

Returns a new instance of MockedExitError.



8
9
10
11
# File 'lib/tomo/testing/mocked_exit_error.rb', line 8

def initialize(status)
  @status = status
  super("tomo exited with status #{status}")
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/tomo/testing/mocked_exit_error.rb', line 6

def status
  @status
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/tomo/testing/mocked_exit_error.rb', line 13

def success?
  [true, 0].include?(status)
end