Class: Mailstro::RealStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/mailstro.rb

Overview

Allows us to remove default behaviour during testing.

Class Method Summary collapse

Class Method Details

.deliver(options) ⇒ Object



17
18
19
# File 'lib/mailstro.rb', line 17

def deliver(options)
  Delivery.new(options).deliver
end

.list_deliver(options) ⇒ Object



20
21
22
# File 'lib/mailstro.rb', line 20

def list_deliver(options)
  ListDelivery.new(options).deliver
end

.subscribe(contact_email, list_type, list_name) ⇒ Object



23
24
25
# File 'lib/mailstro.rb', line 23

def subscribe(contact_email, list_type, list_name)
  ListSubscribe.new(contact_email, list_type, list_name).deliver
end

.unsubscribe(contact_email, list_type, list_name) ⇒ Object



26
27
28
# File 'lib/mailstro.rb', line 26

def unsubscribe(contact_email, list_type, list_name)
  ListUnsubscribe.new(contact_email, list_type, list_name).deliver
end