Class: SendGmail::Client
- Inherits:
-
Object
- Object
- SendGmail::Client
- Defined in:
- lib/send_gmail.rb
Instance Attribute Summary collapse
-
#authorization ⇒ Object
Returns the value of attribute authorization.
-
#client ⇒ Object
Returns the value of attribute client.
-
#gmail_api ⇒ Object
Returns the value of attribute gmail_api.
Instance Method Summary collapse
-
#initialize(app_name = 'gmail_test', app_ver = 'ver1.0') ⇒ Client
constructor
A new instance of Client.
Methods included from Messages
Methods included from MailList
#mail_detail, #mail_id_list, #mail_list, #pickup_contents
Methods included from Auth
Constructor Details
#initialize(app_name = 'gmail_test', app_ver = 'ver1.0') ⇒ Client
Returns a new instance of Client.
16 17 18 19 |
# File 'lib/send_gmail.rb', line 16 def initialize(app_name = 'gmail_test', app_ver = 'ver1.0') @client = Google::APIClient.new(application_name: app_name, application_version: app_ver) @gmail_api = client.discovered_api('gmail', 'v1') end |
Instance Attribute Details
#authorization ⇒ Object
Returns the value of attribute authorization.
14 15 16 |
# File 'lib/send_gmail.rb', line 14 def @authorization end |
#client ⇒ Object
Returns the value of attribute client.
14 15 16 |
# File 'lib/send_gmail.rb', line 14 def client @client end |
#gmail_api ⇒ Object
Returns the value of attribute gmail_api.
14 15 16 |
# File 'lib/send_gmail.rb', line 14 def gmail_api @gmail_api end |