Class: Sappho::Socket::MockSocketOpen
- Inherits:
-
Object
- Object
- Sappho::Socket::MockSocketOpen
- Defined in:
- lib/sappho-socket/mock_socket.rb
Instance Method Summary collapse
- #action(host, port) ⇒ Object
-
#initialize(host, port) ⇒ MockSocketOpen
constructor
A new instance of MockSocketOpen.
Constructor Details
#initialize(host, port) ⇒ MockSocketOpen
Returns a new instance of MockSocketOpen.
70 71 72 73 |
# File 'lib/sappho-socket/mock_socket.rb', line 70 def initialize host, port @host = host @port = port end |
Instance Method Details
#action(host, port) ⇒ Object
75 76 77 78 79 80 |
# File 'lib/sappho-socket/mock_socket.rb', line 75 def action host, port unless host == @host and port == @port raise MockSocketSessionError, "Expected connection to #{@host}:#{@port} but got #{host}:#{port}" end end |