Class: MailHandler::Receiving::Notification::DelayState

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

Direct Known Subclasses

Delay, MaxDelay, NoDelay, Received

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ DelayState

Returns a new instance of DelayState.



15
16
17
18
19
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 15

def initialize(context)

  @context = context

end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



12
13
14
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 12

def context
  @context
end

#notifiedObject

Returns the value of attribute notified.



12
13
14
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 12

def notified
  @notified
end

Instance Method Details

#notification_firedObject



21
22
23
24
25
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 21

def notification_fired

  @notified = true

end

#notify(search) ⇒ Object



27
28
29
30
31
# File 'lib/mailhandler/receiving/notification/email/states.rb', line 27

def notify(search)

  raise MailHandler::InterfaceError, 'notify(search) interface has to be implemented.'

end