lib/saorin/server.rb in saorin-0.2.0 vs lib/saorin/server.rb in saorin-0.3.0
- old
+ new
@@ -1,15 +1,17 @@
-require 'saorin/adapters/servers'
+require 'saorin/registerable'
module Saorin
- class Server
+ module Server
+ include Registerable
+ self.load_path = 'saorin/server'
+
class << self
def new(handler, options = {}, &block)
adapter = options.delete(:adapter) || :rack
- adapter_class = Saorin::Adapters::Servers.guess adapter
+ adapter_class = guess adapter
adapter_class.new handler, options, &block
end
-
alias_method :start, :new
end
end
end