Class: Slyde::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/slyde/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(presentation) ⇒ Server

Returns a new instance of Server.



10
11
12
13
14
# File 'lib/slyde/server.rb', line 10

def initialize(presentation)
  super()

  @presentation = presentation
end

Instance Attribute Details

#presentationObject (readonly)

Returns the value of attribute presentation.



6
7
8
# File 'lib/slyde/server.rb', line 6

def presentation
  @presentation
end

Instance Method Details

#root_urlObject

TODO: This isn’t working right at all. The intention is to easily get the root url, especially when using Rack#map



18
19
20
# File 'lib/slyde/server.rb', line 18

def root_url
  request.url.split(request.path_info)[0]
end