Sha256: 2ddbd906d3be31be6a46484657c55d74e36996c76781008c74960b281c0356e5
Contents?: true
Size: 534 Bytes
Versions: 20
Compression:
Stored size: 534 Bytes
Contents
module Timber module Contexts # The session context tracks the current session for the given user. # # @note This is tracked automatically with the `Integrations::Rack::SessionContext` rack # middleware. class Session < Context @keyspace = :session attr_reader :id def initialize(attributes) @id = attributes[:id] || raise(ArgumentError.new(":id is required")) end def as_json(_options = {}) {id: Timber::Util::Object.try(id, :to_s)} end end end end
Version data entries
20 entries across 20 versions & 1 rubygems