Class: SendGmail::Client

Inherits:
Object
  • Object
show all
Includes:
Auth, MailList, Messages
Defined in:
lib/send_gmail.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Messages

#send_mail

Methods included from MailList

#mail_detail, #mail_id_list, #mail_list, #pickup_contents

Methods included from Auth

#authorize

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

#authorizationObject

Returns the value of attribute authorization.



14
15
16
# File 'lib/send_gmail.rb', line 14

def authorization
  @authorization
end

#clientObject

Returns the value of attribute client.



14
15
16
# File 'lib/send_gmail.rb', line 14

def client
  @client
end

#gmail_apiObject

Returns the value of attribute gmail_api.



14
15
16
# File 'lib/send_gmail.rb', line 14

def gmail_api
  @gmail_api
end