Module: Keybreak
- Defined in:
- lib/keybreak.rb,
lib/keybreak/version.rb,
lib/keybreak/controller.rb
Overview
Utilities for key break (control-break) processing
Defined Under Namespace
Classes: Controller
Constant Summary collapse
- DO_NOTHING =
The block which does nothing.
Proc.new {}
- KEY_CHANGED =
The default key break detector
Proc.new {|key, prev_key| key != prev_key}
- VERSION =
Version.
MAJOR.MINOR.PATCH "0.3.0"
Class Method Summary collapse
-
.execute_with_controller(&block) ⇒ Object
Executes the given block with a Controller instance.
Class Method Details
.execute_with_controller(&block) ⇒ Object
Executes the given block with a Controller instance. Within the block, register your key break handlers and feed keys from your data. Then the handlers will be called for all keys including the last key.
19 20 21 |
# File 'lib/keybreak.rb', line 19 def execute_with_controller(&block) Controller.new.execute(&block) end |