Class: Utter::Internals::Service

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/utter/service.rb

Direct Known Subclasses

Service

Instance Method Summary collapse

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, options = {}, &block)
  super
  signature.to_json # regular json
  #json signature #NOTE we can use regular json or sinatra/json'
end