Class: HTTPSpec::Clients::RaddocsProxy
- Inherits:
-
Object
- Object
- HTTPSpec::Clients::RaddocsProxy
- Defined in:
- lib/http_spec/clients/raddocs_proxy.rb
Defined Under Namespace
Instance Method Summary collapse
- #dispatch(request) ⇒ Object
-
#initialize(inner, metadata, dir = Raddocs.configuration.docs_dir) ⇒ RaddocsProxy
constructor
A new instance of RaddocsProxy.
Constructor Details
#initialize(inner, metadata, dir = Raddocs.configuration.docs_dir) ⇒ RaddocsProxy
Returns a new instance of RaddocsProxy.
8 9 10 11 12 13 14 15 16 |
# File 'lib/http_spec/clients/raddocs_proxy.rb', line 8 def initialize(inner, , dir = Raddocs.configuration.docs_dir) @inner = inner @resource_name = .fetch(:resource_name) @description = [:description] raise KeyError, "key not found :description" unless @description @parameters = [:parameters] @explanation = [:explanation] @dir = dir end |
Instance Method Details
#dispatch(request) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/http_spec/clients/raddocs_proxy.rb', line 18 def dispatch(request) write_index response = @inner.dispatch(request) write_example(request, response) response end |