Class: Mail::Postmark

Inherits:
Object
  • Object
show all
Defined in:
lib/postmark/handlers/mail.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Postmark) initialize(values)



6
7
8
# File 'lib/postmark/handlers/mail.rb', line 6

def initialize(values)
  self.settings = { :api_key => nil }.merge(values)
end

Instance Attribute Details

- (Object) settings

Returns the value of attribute settings



4
5
6
# File 'lib/postmark/handlers/mail.rb', line 4

def settings
  @settings
end

Instance Method Details

- (Object) deliver!(mail)



10
11
12
13
# File 'lib/postmark/handlers/mail.rb', line 10

def deliver!(mail)
  ::Postmark.api_key = settings[:api_key]
  ::Postmark.send_through_postmark(mail)
end