Class: Warden::Bootic::Oauth::User
- Inherits:
-
Object
- Object
- Warden::Bootic::Oauth::User
- Defined in:
- lib/warden-bootic/user.rb
Instance Attribute Summary collapse
-
#attribs ⇒ Object
readonly
Returns the value of attribute attribs.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #email ⇒ Object
-
#initialize(attribs, token) ⇒ User
constructor
A new instance of User.
- #role ⇒ Object
- #user_name ⇒ Object
Constructor Details
#initialize(attribs, token) ⇒ User
Returns a new instance of User.
8 9 10 |
# File 'lib/warden-bootic/user.rb', line 8 def initialize(attribs, token) @attribs, @token = attribs, token end |
Instance Attribute Details
#attribs ⇒ Object (readonly)
Returns the value of attribute attribs.
6 7 8 |
# File 'lib/warden-bootic/user.rb', line 6 def attribs @attribs end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'lib/warden-bootic/user.rb', line 6 def token @token end |
Instance Method Details
#email ⇒ Object
16 17 18 |
# File 'lib/warden-bootic/user.rb', line 16 def email attribs['user_info']['email'] end |
#role ⇒ Object
20 21 22 |
# File 'lib/warden-bootic/user.rb', line 20 def role attribs['user_info']['role_key'] end |
#user_name ⇒ Object
12 13 14 |
# File 'lib/warden-bootic/user.rb', line 12 def user_name attribs['user_info']['user_name'] end |