Sha256: 1a817b433587454058df87153d669431849e9966d69e814ee0d4c7c876ecc51b

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 Bytes

Contents

require 'restpack-web/version'

module RestPack
  class Web
    def initialize(app)
      @app = app
    end

    def call(env)      
      env["restpack"] ||= {}
      host = env["SERVER_NAME"]
      
      env["restpack"][:host] = host #TODO: GJ: add some magic

      @app.call(env)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restpack-web-0.0.2 lib/restpack-web.rb