Sha256: e487a2a3d382456f77b78d55083ab133aecb2c1641468a4fadc3ce944be97480

Contents?: true

Size: 493 Bytes

Versions: 6

Compression:

Stored size: 493 Bytes

Contents

class Gon
  module Request
    class << self

      def env
        @request_env if defined? @request_env
      end

      def env=(environment)
        @request_env = environment
        @request_env['gon'] ||= {}
      end

      def id
        @request_id if defined? @request_id
      end

      def id=(request_id)
        @request_id = request_id
      end

      def gon
        env['gon'] if env
      end

      def clear
        env && (env['gon'] = {})
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gon-4.1.1 lib/gon/request.rb
gon-4.1.0 lib/gon/request.rb
gon-4.0.3 lib/gon/request.rb
gon-4.0.2 lib/gon/request.rb
gon-4.0.1 lib/gon/request.rb
gon-4.0.0 lib/gon/request.rb