Class: MailHandler::Receiving::Notification::NoDelay

Inherits:
DelayState
  • Object
show all
Defined in:
lib/mailhandler/receiving/notification/email/states.rb

Instance Attribute Summary

Attributes inherited from DelayState

#context, #notified

Instance Method Summary collapse

Methods inherited from DelayState

#initialize, #notification_fired

Constructor Details

This class inherits a constructor from MailHandler::Receiving::Notification::DelayState

Instance Method Details

#notify(search) ⇒ Object



50
51
52
53
54
55
56
57
58
59
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 50

def notify(search)

  if Time.now - search.started_at >= context.min_time_to_notify

    context.set_state(Delay.new(context))
    context.notify(search)

  end

end