Class: Cucumber::Wire::RequestHandler
- Inherits:
-
Object
- Object
- Cucumber::Wire::RequestHandler
show all
- Defined in:
- lib/cucumber/wire/request_handler.rb
Instance Method Summary
collapse
Constructor Details
#initialize(connection, registry = nil) ⇒ RequestHandler
Returns a new instance of RequestHandler.
4
5
6
7
8
|
# File 'lib/cucumber/wire/request_handler.rb', line 4
def initialize(connection, registry = nil)
@connection = connection
@message = underscore(self.class.name.split('::').last)
@registry = registry
end
|
Instance Method Details
#execute(request_params = nil) ⇒ Object
10
11
12
|
# File 'lib/cucumber/wire/request_handler.rb', line 10
def execute(request_params = nil)
@connection.call_remote(self, @message, request_params)
end
|
#handle_fail(params) ⇒ Object
14
15
16
|
# File 'lib/cucumber/wire/request_handler.rb', line 14
def handle_fail(params)
raise @connection.exception(params)
end
|
#handle_success(params) ⇒ Object
18
19
|
# File 'lib/cucumber/wire/request_handler.rb', line 18
def handle_success(params)
end
|