Class: Utilrb::EventLoop::Event
Overview
An event loop event
Instance Method Summary collapse
- #call ⇒ Object
-
#ignore! ⇒ Object
If called the event will be ignored and removed from all internal event queues.
- #ignore? ⇒ Boolean
-
#initialize(block) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(block) ⇒ Event
Returns a new instance of Event.
152 153 154 155 |
# File 'lib/utilrb/event_loop.rb', line 152 def initialize(block) @block = block @ignore = false end |
Instance Method Details
#call ⇒ Object
157 158 159 |
# File 'lib/utilrb/event_loop.rb', line 157 def call @block.call end |
#ignore! ⇒ Object
If called the event will be ignored and removed from all internal event queues.
163 164 165 |
# File 'lib/utilrb/event_loop.rb', line 163 def ignore! @ignore = true end |
#ignore? ⇒ Boolean
167 168 169 |
# File 'lib/utilrb/event_loop.rb', line 167 def ignore? @ignore end |