Sha256: 3c5266bd2e15fec91ef791fe7bbec481497ee4cee6aecafaa6de1f53f39020e7

Contents?: true

Size: 358 Bytes

Versions: 13

Compression:

Stored size: 358 Bytes

Contents

# frozen_string_literal: true

module Influxer
  module Scoping
    # Clone of current_scope methods for older versions of ActiveModel
    module CurrentScope
      def current_scope
        Thread.current["#{self}_current_scope"]
      end

      def current_scope=(scope)
        Thread.current["#{self}_current_scope"] = scope
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
influxer-2.0.0 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.4.0 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.3.0 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.2.2 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.2.1 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.2.0 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.6 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.5 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.4 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.3 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.2 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.1 lib/influxer/metrics/scoping/old_current_scope.rb
influxer-1.1.0 lib/influxer/metrics/scoping/old_current_scope.rb