Class: Mimic::API
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Mimic::API
- Defined in:
- lib/mimic/api.rb
Class Attribute Summary collapse
-
.host ⇒ Object
Returns the value of attribute host.
Instance Method Summary collapse
Class Attribute Details
.host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/mimic/api.rb', line 8 def host @host end |
Instance Method Details
#host ⇒ Object
11 12 13 |
# File 'lib/mimic/api.rb', line 11 def host self.class.host end |
#process_request(request, verb) ⇒ Object
59 60 61 62 63 |
# File 'lib/mimic/api.rb', line 59 def process_request request, verb api_request = APIRequest.from_request(request, verb) api_request.setup_stubs_on(host) [201, {"Content-Type" => api_request.request_content_type}, api_request.response] end |