Module: NoNotifierNeeded::Send

Included in:
NoNotifierNeeded
Defined in:
lib/no_notifier_needed/send.rb

Instance Method Summary collapse

Instance Method Details

#send_at(what_time, which_email, *args) ⇒ Object



13
14
15
16
17
# File 'lib/no_notifier_needed/send.rb', line 13

def send_at(what_time, which_email, *args)
  email_hash = translate_to_hash(which_email, args)
  time_from_now = what_time.is_a?(Time) ? what_time : Chronic.parse(what_time)
  Resque.enqueue_at(time_from_now, EmailProcessor, email_hash)
end

#send_in(time_from_now, which_email, *args) ⇒ Object



8
9
10
11
# File 'lib/no_notifier_needed/send.rb', line 8

def send_in(time_from_now, which_email, *args)
  email_hash = translate_to_hash(which_email, args)
  Resque.enqueue_in(time_from_now, EmailProcessor, email_hash)
end

#send_now(which_email, *args) ⇒ Object



3
4
5
6
# File 'lib/no_notifier_needed/send.rb', line 3

def send_now(which_email, *args)
  email_hash = translate_to_hash(which_email, args)
  Resque.enqueue(EmailProcessor, email_hash)
end