Sha256: 40972911e4e8b95fb18f9c97a28bd135ca7d7cc4f681eec9a19aaf2edf85cbb7

Contents?: true

Size: 268 Bytes

Versions: 3

Compression:

Stored size: 268 Bytes

Contents

module CodeBuddy
  class ShowApp
    def initialize(app)
      @app = app
    end

    def call(env)
      if env['PATH_INFO'] =~ /^\/code_buddy(.*)/
        env['PATH_INFO'] = $1
        App.new.call(env)
      else
        @app.call(env)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
code_buddy-0.0.5 lib/code_buddy/middleware.rb
code_buddy-0.0.4 lib/code_buddy/middleware.rb
code_buddy-0.0.3 lib/code_buddy/middleware.rb