Class: GoogleOAuth::Client
- Inherits:
-
Object
- Object
- GoogleOAuth::Client
- Includes:
- Calendar
- Defined in:
- lib/google_oauth/client.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#google_client ⇒ Object
Returns the value of attribute google_client.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
-
#method_missing(method, *args, &block) ⇒ Object
Delegate to Google OAuth Client.
Methods included from Calendar
#calendars, #clear_calendar, #delete_calendar, #delete_calendar_list, #delete_event, #event_instances, #events, #get_calendar, #get_event, #import_event, #insert_calendar, #insert_calendar_list, #insert_event, #move_event, #patch_calendar, #patch_calendar_list, #quick_add_event, #update_calendar, #update_calendar_list, #update_event
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 18 |
# File 'lib/google_oauth/client.rb', line 10 def initialize( = {}) [:refresh_token, :access_token, :expires_at].each do |attr| instance_variable_set("@#{attr}".to_sym, [:authentication].send(attr)) end @authentication = [:authentication] setup_google_client! end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Delegate to Google OAuth Client
21 22 23 |
# File 'lib/google_oauth/client.rb', line 21 def method_missing(method, *args, &block) google_client.send(method, *args, &block) end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
8 9 10 |
# File 'lib/google_oauth/client.rb', line 8 def access_token @access_token end |
#authentication ⇒ Object
Returns the value of attribute authentication.
8 9 10 |
# File 'lib/google_oauth/client.rb', line 8 def authentication @authentication end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
8 9 10 |
# File 'lib/google_oauth/client.rb', line 8 def expires_at @expires_at end |
#google_client ⇒ Object
Returns the value of attribute google_client.
8 9 10 |
# File 'lib/google_oauth/client.rb', line 8 def google_client @google_client end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
8 9 10 |
# File 'lib/google_oauth/client.rb', line 8 def refresh_token @refresh_token end |