Class: Jasmine::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/jasmine/application.rb

Class Method Summary collapse

Class Method Details

.app(config, builder = Rack::Builder.new) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/jasmine/application.rb', line 11

def self.app(config, builder = Rack::Builder.new)
  config.rack_apps.each do |(app, config_block)|
    builder.use(app, &config_block)
  end
  config.rack_path_map.each do |path, handler|
    builder.map(path) { run handler.call }
  end
  builder
end