Class: HttpMailer::SendGridServiceApi
- Inherits:
-
Object
- Object
- HttpMailer::SendGridServiceApi
- Defined in:
- lib/http_mailer/sendgrid/sendgrid_service_api.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Instance Method Summary collapse
-
#initialize(host, protocol = 'https') ⇒ SendGridServiceApi
constructor
A new instance of SendGridServiceApi.
- #send_messages_url ⇒ Object
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
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 3 def host @host end |
#protocol ⇒ Object
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_url ⇒ Object
10 11 12 |
# File 'lib/http_mailer/sendgrid/sendgrid_service_api.rb', line 10 def "#{self.protocol}://#{self.host}/api/mail.send.json" end |