Class: Oauth2Rails::Profile
- Inherits:
-
Object
- Object
- Oauth2Rails::Profile
- Defined in:
- lib/oauth2_rails/user.rb
Instance Method Summary collapse
- #about_me ⇒ Object
- #city ⇒ Object
- #country ⇒ Object
- #display_name ⇒ Object
- #full_name ⇒ Object
- #id ⇒ Object
-
#initialize(profile) ⇒ Profile
constructor
A new instance of Profile.
- #json_response ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize(profile) ⇒ Profile
Returns a new instance of Profile.
3 4 5 |
# File 'lib/oauth2_rails/user.rb', line 3 def initialize(profile) @profile = profile end |
Instance Method Details
#about_me ⇒ Object
35 36 37 |
# File 'lib/oauth2_rails/user.rb', line 35 def about_me @profile['user']['aboutMe'] end |
#city ⇒ Object
31 32 33 |
# File 'lib/oauth2_rails/user.rb', line 31 def city @profile['user']['city'] end |
#country ⇒ Object
23 24 25 |
# File 'lib/oauth2_rails/user.rb', line 23 def country @profile['user']['country'] end |
#display_name ⇒ Object
19 20 21 |
# File 'lib/oauth2_rails/user.rb', line 19 def display_name @profile['user']['displayName'] end |
#full_name ⇒ Object
15 16 17 |
# File 'lib/oauth2_rails/user.rb', line 15 def full_name @profile['user']['fullName'] end |
#id ⇒ Object
11 12 13 |
# File 'lib/oauth2_rails/user.rb', line 11 def id @profile['user']['encodedId'] end |
#json_response ⇒ Object
7 8 9 |
# File 'lib/oauth2_rails/user.rb', line 7 def json_response @profile end |
#state ⇒ Object
27 28 29 |
# File 'lib/oauth2_rails/user.rb', line 27 def state @profile['user']['state'] end |