Class: Userbin::Session
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
-
#user ⇒ Object
Hack to avoid loading a remote user.
Instance Method Details
#authenticated? ⇒ Boolean
19 20 21 |
# File 'lib/userbin/session.rb', line 19 def authenticated? !user.id.nil? rescue false end |
#user ⇒ Object
Hack to avoid loading a remote user
14 15 16 17 |
# File 'lib/userbin/session.rb', line 14 def user return self['user'] if self['user'].is_a?(User) User.new(self['user']) if self['user'] end |