lib/timber/contexts/user.rb in timber-2.1.3 vs lib/timber/contexts/user.rb in timber-2.1.4

- old
+ new

@@ -11,20 +11,22 @@ # middleware for supported authentication frameworks. See {Integrations::Rack::UserContext} # for more details. class User < Context @keyspace = :user - attr_reader :id, :name, :email + attr_reader :id, :name, :email, :type, :meta def initialize(attributes) @id = attributes[:id] @name = attributes[:name] @email = attributes[:email] + @type = attributes[:type] + @meta = attributes[:meta] end # Builds a hash representation containing simple objects, suitable for serialization (JSON). def as_json(_options = {}) - {id: Timber::Util::Object.try(id, :to_s), name: name, email: email} + {id: Timber::Util::Object.try(id, :to_s), name: name, email: email, type: type, meta: meta} end end end end \ No newline at end of file