Class: SocialOauthApi::User
- Inherits:
-
Object
- Object
- SocialOauthApi::User
- Defined in:
- lib/social_oauth_api/user.rb
Instance Method Summary collapse
- #id ⇒ Object
- #image_url ⇒ Object
-
#initialize(options) ⇒ User
constructor
A new instance of User.
- #initialize_provider_user(options) ⇒ Object
- #name ⇒ Object
- #user_info ⇒ Object
Constructor Details
#initialize(options) ⇒ User
Returns a new instance of User.
5 6 7 |
# File 'lib/social_oauth_api/user.rb', line 5 def initialize initialize_provider_user() end |
Instance Method Details
#id ⇒ Object
13 14 15 |
# File 'lib/social_oauth_api/user.rb', line 13 def id @provider_user.id end |
#image_url ⇒ Object
21 22 23 |
# File 'lib/social_oauth_api/user.rb', line 21 def image_url @provider_user.image_url end |
#initialize_provider_user(options) ⇒ Object
25 26 27 28 29 |
# File 'lib/social_oauth_api/user.rb', line 25 def initialize_provider_user provider_type = [:provider_type].capitalize user_class_name = "SocialOauthApi::#{provider_type}::User" @provider_user = SocialOauthApi::Base.klass(user_class_name).new() end |
#name ⇒ Object
17 18 19 |
# File 'lib/social_oauth_api/user.rb', line 17 def name @provider_user.name end |
#user_info ⇒ Object
9 10 11 |
# File 'lib/social_oauth_api/user.rb', line 9 def user_info @provider_user.user_info end |