Class: Mailgunner::DeliveryMethod

Inherits:
Object
  • Object
show all
Includes:
Mail::CheckDeliveryParams
Defined in:
lib/mailgunner/delivery_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ DeliveryMethod

Returns a new instance of DeliveryMethod.



11
12
13
# File 'lib/mailgunner/delivery_method.rb', line 11

def initialize(values)
  self.settings = values
end

Instance Attribute Details

#settingsObject

Returns the value of attribute settings.



9
10
11
# File 'lib/mailgunner/delivery_method.rb', line 9

def settings
  @settings
end

Instance Method Details

#deliver!(mail) ⇒ Object



15
16
17
18
19
20
# File 'lib/mailgunner/delivery_method.rb', line 15

def deliver!(mail)
  check(mail)

  client = Client.new(**settings)
  client.send_mime(mail)
end