Class: Koine::TestRunner::Adapters::LastCommand
- Inherits:
-
BaseAdapter
- Object
- BaseAdapter
- Koine::TestRunner::Adapters::LastCommand
- Defined in:
- lib/koine/test_runner/adapters/last_command.rb
Defined Under Namespace
Classes: Storage
Instance Attribute Summary
Attributes inherited from BaseAdapter
Instance Method Summary collapse
-
#initialize(storage: Storage.new) ⇒ LastCommand
constructor
A new instance of LastCommand.
- #test_command(config) ⇒ Object
Constructor Details
#initialize(storage: Storage.new) ⇒ LastCommand
5 6 7 |
# File 'lib/koine/test_runner/adapters/last_command.rb', line 5 def initialize(storage: Storage.new) @storage = storage end |
Instance Method Details
#test_command(config) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/koine/test_runner/adapters/last_command.rb', line 9 def test_command(config) command = next_adapter.test_command(config) unless command return @storage.retrieve end @storage.store(command) command end |