module MailCatcher::Web
Public Instance Methods
app()
click to toggle source
# File lib/mail_catcher/web.rb, line 9 def app @@app ||= Rack::Builder.new do map(MailCatcher.options[:http_path]) do if MailCatcher.development? require "mail_catcher/web/assets" map("/assets") { run Assets } end run Application end # This should only affect when http_path is anything but "/" above run lambda { |env| [302, {"Location" => MailCatcher.options[:http_path]}, []] } end end
call(env)
click to toggle source
# File lib/mail_catcher/web.rb, line 25 def call(env) app.call(env) end