lib/opener/constituent_parser/server.rb in opener-constituent-parser-1.2.3 vs lib/opener/constituent_parser/server.rb in opener-constituent-parser-2.0.0
- old
+ new
@@ -1,16 +1,15 @@
-require 'sinatra/base'
-require 'httpclient'
require 'opener/webservice'
module Opener
class ConstituentParser
##
# Constituent parser server powered by Sinatra.
#
- class Server < Webservice
+ class Server < Webservice::Server
set :views, File.expand_path('../views', __FILE__)
- text_processor ConstituentParser
- accepted_params :input, :language
+
+ self.text_processor = ConstituentParser
+ self.accepted_params = [:input, :language]
end # Server
end # ConstituentParser
end # Opener