Class: EventMachine::IMAP::Listener

Inherits:
Object
  • Object
show all
Includes:
ListeningDeferrable
Defined in:
lib/em-imap/listener.rb

Direct Known Subclasses

Command

Instance Method Summary collapse

Methods included from ListeningDeferrable

#listen, #receive_event, #stopback, #transform

Constructor Details

#initialize(&block) ⇒ Listener

Returns a new instance of Listener.



151
152
153
154
# File 'lib/em-imap/listener.rb', line 151

def initialize(&block)
  @stopped = false
  listen &block if block_given?
end

Instance Method Details

#stopObject



156
157
158
159
# File 'lib/em-imap/listener.rb', line 156

def stop(*)
  @stopped = true
  super
end

#stopped?Boolean

Returns:

  • (Boolean)


161
162
163
# File 'lib/em-imap/listener.rb', line 161

def stopped?
  @stopped
end