Sha256: 569c4e55ced69de22b817222ad14b47577496d41ce8f20f5665c1f3b0f78a195

Contents?: true

Size: 341 Bytes

Versions: 8

Compression:

Stored size: 341 Bytes

Contents

# Copyright (c) 2014 AppNeta, Inc.
# All rights reserved.

module Oboe
  module ThreadLocal
    def thread_local(name)
      key = "__#{self}_#{name}__".intern

      define_method(name) do
        Thread.current[key]
      end

      define_method(name.to_s + "=") do |value|
        Thread.current[key] = value
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
oboe-heroku-0.9.18.1 lib/oboe-heroku/thread_local.rb
oboe-heroku-0.9.17.8 lib/oboe-heroku/thread_local.rb
oboe-heroku-0.9.17.4 lib/oboe-heroku/thread_local.rb
oboe-heroku-0.9.17.3 lib/oboe-heroku/thread_local.rb
oboe-heroku-0.9.16.1 lib/oboe-heroku/thread_local.rb
oboe-heroku-0.9.15.6 lib/oboe-heroku/thread_local.rb
oboe-2.7.1.7 lib/oboe/thread_local.rb
oboe-2.7.1.7-java lib/oboe/thread_local.rb