Class: Utter::Internals::Service
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Utter::Internals::Service
- Defined in:
- lib/utter/service.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#route(verb, path, options = {}, &block) ⇒ Object
Makes sure that any response Utter gives back is in JSON format TODO check if streaming needs a different class if this mechanism doesn’t work with it.
Instance Method Details
#route(verb, path, options = {}, &block) ⇒ Object
Makes sure that any response Utter gives back is in JSON format TODO check if streaming needs a different class if this mechanism doesn’t work with it
31 32 33 34 35 |
# File 'lib/utter/service.rb', line 31 def route(verb, path, = {}, &block) super signature.to_json # regular json #json signature #NOTE we can use regular json or sinatra/json' end |