Exception: Spinach::HookNotYieldException
- Inherits:
-
StandardError
- Object
- StandardError
- Spinach::HookNotYieldException
- Defined in:
- lib/spinach/exceptions.rb
Overview
This class represents the exception raised when Spinach detects that the around_scenario hook does not yield.
Instance Attribute Summary collapse
-
#hook ⇒ Object
readonly
Returns the value of attribute hook.
Instance Method Summary collapse
-
#initialize(hook) ⇒ HookNotYieldException
constructor
A new instance of HookNotYieldException.
-
#message ⇒ String
A custom message when a hook did not yield.
Constructor Details
#initialize(hook) ⇒ HookNotYieldException
Returns a new instance of HookNotYieldException.
59 60 61 |
# File 'lib/spinach/exceptions.rb', line 59 def initialize(hook) @hook = hook end |
Instance Attribute Details
#hook ⇒ Object (readonly)
Returns the value of attribute hook.
53 54 55 |
# File 'lib/spinach/exceptions.rb', line 53 def hook @hook end |
Instance Method Details
#message ⇒ String
Returns A custom message when a hook did not yield.
67 68 69 |
# File 'lib/spinach/exceptions.rb', line 67 def "#{@hook} hooks *must* yield" end |