lib/timber/contexts/user.rb in timber-1.1.3 vs lib/timber/contexts/user.rb in timber-1.1.4
- old
+ new
@@ -17,18 +17,19 @@
# end
#
class User < Context
@keyspace = :user
- attr_reader :id, :name
+ attr_reader :id, :name, :email
def initialize(attributes)
@id = attributes[:id]
@name = attributes[:name]
+ @email = attributes[:email]
end
def as_json(_options = {})
- {id: Timber::Object.try(id, :to_s), name: name}
+ {id: Timber::Util::Object.try(id, :to_s), name: name, email: email}
end
end
end
end
\ No newline at end of file