Class: NimbleAuth::Omniauth::GoogleOauth2
- Inherits:
-
Object
- Object
- NimbleAuth::Omniauth::GoogleOauth2
- Defined in:
- app/services/nimble_auth/omniauth/google_oauth2.rb
Instance Attribute Summary collapse
-
#oauth ⇒ Object
readonly
Returns the value of attribute oauth.
Instance Method Summary collapse
-
#initialize(oauth) ⇒ GoogleOauth2
constructor
A new instance of GoogleOauth2.
- #to_h ⇒ Object
Constructor Details
#initialize(oauth) ⇒ GoogleOauth2
Returns a new instance of GoogleOauth2.
7 8 9 |
# File 'app/services/nimble_auth/omniauth/google_oauth2.rb', line 7 def initialize(oauth) @oauth = oauth end |
Instance Attribute Details
#oauth ⇒ Object (readonly)
Returns the value of attribute oauth.
5 6 7 |
# File 'app/services/nimble_auth/omniauth/google_oauth2.rb', line 5 def oauth @oauth end |
Instance Method Details
#to_h ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/services/nimble_auth/omniauth/google_oauth2.rb', line 11 def to_h { first_name: raw_info.dig(:first_name), last_name: raw_info.dig(:last_name), email: raw_info.dig(:email), avatar: raw_info.dig(:image) } end |