Sha256: 98b9850065d99438648ba889b66d5def9f1797f5640d7c38ecb93ee9a089c425

Contents?: true

Size: 306 Bytes

Versions: 9

Compression:

Stored size: 306 Bytes

Contents

module Journaled
  class Current < ActiveSupport::CurrentAttributes
    attribute :tags
    attribute :journaled_actor_proc

    def tags=(value)
      super(value.freeze)
    end

    def tags
      attributes[:tags] ||= {}.freeze
    end

    def actor
      journaled_actor_proc&.call
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
journaled-5.3.1 lib/journaled/current.rb
journaled-5.3.0 lib/journaled/current.rb
journaled-5.2.0 lib/journaled/current.rb
journaled-5.1.1 lib/journaled/current.rb
journaled-5.1.0 lib/journaled/current.rb
journaled-5.0.0 lib/journaled/current.rb
journaled-4.3.0 lib/journaled/current.rb
journaled-4.2.0 lib/journaled/current.rb
journaled-4.1.0 lib/journaled/current.rb