class Dr::Server

Public Class Methods

new(port, root_route, address, archive_path) click to toggle source
# File lib/dr/server.rb, line 8
def initialize(port, root_route, address, archive_path)
  @port = port
  @host = address
  @dir_server = Rack::Builder.new do
    map root_route do
      run Rack::Directory.new(archive_path)
    end
  end
end

Public Instance Methods

start() click to toggle source
# File lib/dr/server.rb, line 18
def start
  Rack::Handler::Thin.run(@dir_server, :Port => @port, :Host => @host)
end