Module: Servel

Defined in:
lib/servel.rb,
lib/servel/version.rb

Defined Under Namespace

Modules: Instrumentation Classes: App, CLI, Entry, EntryFactory, HamlContext, HomeApp, Index

Constant Summary collapse

VERSION =
"0.24.0"

Class Method Summary collapse

Class Method Details

.build_app(path_map) ⇒ Object



12
13
14
15
16
17
# File 'lib/servel.rb', line 12

def self.build_app(path_map)
  url_map = path_map.map { |root, url_root| [url_root, Servel::App.new(root)] }.to_h
  url_map["/"] = Servel::HomeApp.new(path_map.values) unless url_map.keys.include?("/")

  Rack::URLMap.new(url_map)
end