lib/lifen/user.rb in lifen-1.1.0 vs lib/lifen/user.rb in lifen-1.2.0
- old
+ new
@@ -1,11 +1,12 @@
module Lifen
class User
include Virtus.model(finalize: false)
- attribute :token, "Lifen::Token"#, default: proc { Lifen::Token.new() }
+ attribute :token, "Lifen::Token"
attribute :status, "Lifen::Status"
+ attribute :settings, "Lifen::Settings"
attribute :uuid, String
attribute :email, String
attribute :last_name, String
attribute :first_name, String
@@ -35,9 +36,13 @@
@token = token
end
def status
@status ||= Lifen::Status.new(user: self)
+ end
+
+ def settings
+ @settings ||= Lifen::Settings.new(user: self).refresh
end
def client
UserAuthenticatedClient.new(token)
end
\ No newline at end of file