Class: Sappho::Socket::MockSocketSettle
- Inherits:
-
Object
- Object
- Sappho::Socket::MockSocketSettle
- Defined in:
- lib/sappho-socket/mock_socket.rb
Instance Method Summary collapse
- #action(seconds) ⇒ Object
-
#initialize(seconds) ⇒ MockSocketSettle
constructor
A new instance of MockSocketSettle.
Constructor Details
#initialize(seconds) ⇒ MockSocketSettle
Returns a new instance of MockSocketSettle.
115 116 117 |
# File 'lib/sappho-socket/mock_socket.rb', line 115 def initialize seconds @seconds = seconds end |
Instance Method Details
#action(seconds) ⇒ Object
119 120 121 122 123 124 |
# File 'lib/sappho-socket/mock_socket.rb', line 119 def action seconds unless seconds == @seconds raise MockSocketSessionError, "Expected settle sleep of #{@seconds} seconds but got request for #{seconds}" end end |