Class: EventMachine::IMAP::Listener
- Inherits:
-
Object
- Object
- EventMachine::IMAP::Listener
- Includes:
- ListeningDeferrable
- Defined in:
- lib/em-imap/listener.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(&block) ⇒ Listener
constructor
A new instance of Listener.
- #stop ⇒ Object
- #stopped? ⇒ Boolean
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
#stop ⇒ Object
156 157 158 159 |
# File 'lib/em-imap/listener.rb', line 156 def stop(*) @stopped = true super end |
#stopped? ⇒ Boolean
161 162 163 |
# File 'lib/em-imap/listener.rb', line 161 def stopped? @stopped end |