Class: Mountebank::Stub::ProxyResponse
- Defined in:
- lib/mountebank/stub/proxy_response.rb
Constant Summary collapse
- PROXY_MODE_ONCE =
'proxyOnce'
- PROXY_MODE_ALWAYS =
'proxyAlways'
Instance Attribute Summary
Attributes inherited from Response
Class Method Summary collapse
Methods inherited from Response
#initialize, #to_json, with_injection
Constructor Details
This class inherits a constructor from Mountebank::Stub::Response
Class Method Details
.create(to, mode = PROXY_MODE_ONCE, predicateGenerators = []) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/mountebank/stub/proxy_response.rb', line 5 def self.create(to, mode=PROXY_MODE_ONCE, predicateGenerators=[]) data = {proxy: { to: to, mode: mode, predicateGenerators: predicateGenerators } } new(data) end |