Class: HttpMailer::SendGridServiceApi

Inherits:
Object
  • Object
show all
Defined in:
lib/http_mailer/sendgrid/sendgrid_service_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, protocol = 'https') ⇒ SendGridServiceApi

Returns a new instance of SendGridServiceApi.



5
6
7
8
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 5

def initialize(host, protocol='https')
  @host = host
  @protocol = protocol
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 3

def host
  @host
end

#protocolObject

Returns the value of attribute protocol.



3
4
5
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 3

def protocol
  @protocol
end

Instance Method Details

#send_messages_urlObject



10
11
12
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 10

def send_messages_url
  "#{self.protocol}://#{self.host}/api/mail.send.json"
end