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.
156 157 158 159 |
# File 'lib/utilrb/event_loop.rb', line 156 def initialize(block) @block = block @ignore = false end |
Instance Method Details
#call ⇒ Object
161 162 163 |
# File 'lib/utilrb/event_loop.rb', line 161 def call @block.call end |
#ignore! ⇒ Object
If called the event will be ignored and removed from all internal event queues.
167 168 169 |
# File 'lib/utilrb/event_loop.rb', line 167 def ignore! @ignore = true end |
#ignore? ⇒ Boolean
171 172 173 |
# File 'lib/utilrb/event_loop.rb', line 171 def ignore? @ignore end |