Class: Capuchin::Scheduler
- Inherits:
-
Object
- Object
- Capuchin::Scheduler
- Defined in:
- lib/capuchin/scheduler.rb
Instance Method Summary collapse
-
#initialize(email, options, api = Capuchin::MailChimp.new) ⇒ Scheduler
constructor
A new instance of Scheduler.
- #schedule ⇒ Object
Constructor Details
Instance Method Details
#schedule ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/capuchin/scheduler.rb', line 10 def schedule result = @api.schedule(@email, list_id, template_id, from_name, from_email, delivery_time) if result['complete'] "#{@email.subject} was scheduled to be sent." else raise "Something went wrong!" end end |