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

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

Overview

base state

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.



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

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



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

def context
  @context
end

#notifiedObject

Returns the value of attribute notified.



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

def notified
  @notified
end

Instance Method Details

#notification_firedObject



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

def notification_fired
  @notified = true
end

#notify(_search) ⇒ Object



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

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