lib/timber/contexts/session.rb in timber-2.1.0.rc5 vs lib/timber/contexts/session.rb in timber-2.1.0.rc6
- old
+ new
@@ -1,11 +1,11 @@
require "timber/context"
require "timber/util"
module Timber
module Contexts
- # The session context adds the current session ID to your logs. This allows your
+ # The session context adds the current session ID to your logs. This allows you
# to tail and filter logs by specific session IDs. Moreover, it gives you a unique
# identifier to report on user activity by session. This way your logs can tell the
# story of how many time a user has engaged your site.
#
# @note This is tracked automatically with the {Integrations::Rack::SessionContext} rack
@@ -17,10 +17,10 @@
def initialize(attributes)
@id = attributes[:id] || raise(ArgumentError.new(":id is required"))
end
- # Builds a hash representation of containing simply objects, suitable for serialization.
+ # Builds a hash representation containing simple objects, suitable for serialization (JSON).
def as_json(_options = {})
{id: Timber::Util::Object.try(id, :to_s)}
end
end
end
\ No newline at end of file