Class: Oauth2Rails::Profile

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth2_rails/user.rb

Instance Method Summary collapse

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_meObject



35
36
37
# File 'lib/oauth2_rails/user.rb', line 35

def about_me
  @profile['user']['aboutMe']
end

#cityObject



31
32
33
# File 'lib/oauth2_rails/user.rb', line 31

def city
  @profile['user']['city']
end

#countryObject



23
24
25
# File 'lib/oauth2_rails/user.rb', line 23

def country
  @profile['user']['country']
end

#display_nameObject



19
20
21
# File 'lib/oauth2_rails/user.rb', line 19

def display_name
  @profile['user']['displayName']
end

#full_nameObject



15
16
17
# File 'lib/oauth2_rails/user.rb', line 15

def full_name
  @profile['user']['fullName']
end

#idObject



11
12
13
# File 'lib/oauth2_rails/user.rb', line 11

def id
  @profile['user']['encodedId']
end

#json_responseObject



7
8
9
# File 'lib/oauth2_rails/user.rb', line 7

def json_response
  @profile
end

#stateObject



27
28
29
# File 'lib/oauth2_rails/user.rb', line 27

def state
  @profile['user']['state']
end