Module: Omglog
- Defined in:
- lib/osx.rb,
lib/linux.rb,
lib/omglog.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.8'
Class Method Summary collapse
Class Method Details
.on_terminal_resize(&block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/omglog.rb', line 13 def on_terminal_resize &block rendering = true trap("WINCH") { # A dragging resize fires lots of WINCH events; this throttles the redraw # and should cause it to (usually) line up with the final dimensions. if rendering rendering = false sleep 0.5 rendering = true yield end } end |