Class: RSpec::Retryable::Handlers
- Inherits:
-
Object
- Object
- RSpec::Retryable::Handlers
- Defined in:
- lib/rspec/retryable/handlers.rb
Instance Method Summary collapse
-
#initialize ⇒ Handlers
constructor
A new instance of Handlers.
- #invoke(payload) ⇒ Object
- #register(klass, *args, **kwargs) ⇒ Object
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Handlers
Returns a new instance of Handlers.
6 7 8 |
# File 'lib/rspec/retryable/handlers.rb', line 6 def initialize @handlers = [] end |
Instance Method Details
#invoke(payload) ⇒ Object
18 19 20 |
# File 'lib/rspec/retryable/handlers.rb', line 18 def invoke(payload) traverse(0, payload) end |
#register(klass, *args, **kwargs) ⇒ Object
10 11 12 |
# File 'lib/rspec/retryable/handlers.rb', line 10 def register(klass, *args, **kwargs) @handlers << klass.new(*args, **kwargs) end |
#reset! ⇒ Object
14 15 16 |
# File 'lib/rspec/retryable/handlers.rb', line 14 def reset! @handlers.clear end |