Class: Phd::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/phd/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(db, root_path) ⇒ Server

Returns a new instance of Server.



3
4
5
6
# File 'lib/phd/server.rb', line 3

def initialize(db, root_path)
  @db   = db
  @root = root_path
end

Instance Method Details

#run(opts = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/phd/server.rb', line 8

def run(opts = {})
  require 'sinatra'
  set :run, true
  get '/' do
    return "hello: #{rand}"
  end
end