Sha256: 44eb1eb51bd43a875bcce6111ba847e733cc3cf58d863e56d7019c71352a35c3

Contents?: true

Size: 437 Bytes

Versions: 1

Compression:

Stored size: 437 Bytes

Contents

module Sandboxy
    class Middleware

        def initialize app
            @app = app
        end

        def call env
            require 'sandboxy'

            previous_sandbox = $sandbox
            $sandbox = Sandboxy.environment == 'sandbox' ? true : false
            
            puts 'Sandbox: Moved to ' + Sandboxy.environment.to_s + ' environment' if $sandbox != previous_sandbox
        end

    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sandboxy-1.1.1 lib/sandboxy/middleware.rb