diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-03-26 10:54:00 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-03-26 10:54:00 +0100 |
commit | 1d70fd3f71f8df9d01a9833f2fb8383b3ef3b6f3 (patch) | |
tree | 05792357a935198a5969b6c183d61b1c214e44fd | |
parent | ce7216c6da3767e3e55429eaa0b55c367939ee38 (diff) |
webapp dir removed
-rw-r--r-- | webapp/sinatra.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/webapp/sinatra.rb b/webapp/sinatra.rb deleted file mode 100644 index b6becab..0000000 --- a/webapp/sinatra.rb +++ /dev/null @@ -1,44 +0,0 @@ -# sinatra.rb -# Common service -# Author: Andreas Maunz - -module OpenTox - class Application < Service - - # Conveniently accessible from anywhere within the Application class, - # it negotiates the appropriate output format based on object class - # and requested MIME type. - # @param [Object] an object - # @return [String] object serialization - def format_output (obj) - - if obj.class == String - - case @accept - when /text\/html/ - content_type "text/html" - obj.to_html - else - content_type 'text/uri-list' - obj - end - - else - - case @accept - when "application/rdf+xml" - content_type "application/rdf+xml" - obj.to_rdfxml - when /text\/html/ - content_type "text/html" - obj.to_html - else - content_type "text/turtle" - obj.to_turtle - end - - end - end - - end -end |