Mandrake::Middleware can quickly be used on your application
Examples:
use Mandrake::Middleware do use Rack::ETag, if: request.path_info.start_with?("/public") end
10 11 12 13 14 15
# File 'lib/mandrake/middleware.rb', line 10 def self.new(app, &block) builder = Mandrake::Builder.new builder.instance_eval(&block) builder.run(app) builder.to_app end