Sha256: 97afb6c420769d48983734f0b9083c2787bbd2ad0b42674f4d0549f3c4cc960e

Contents?: true

Size: 310 Bytes

Versions: 6

Compression:

Stored size: 310 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'uvrb'

loop = UV::Loop.default

stdin = loop.tty($stdin.fileno, true)
stdin.enable_raw_mode
stdin.start_read do |data|
  $stdout << data
end

stoper = loop.timer
stoper.start(25000, 0) do
  puts "25 seconds passed"
  stdin.close
  stoper.close
end

loop.run

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uvrb-0.2.0 examples/tty_example.rb
uvrb-0.1.4 examples/tty_example.rb
uvrb-0.1.3 examples/tty_example.rb
uvrb-0.1.2 examples/tty_example.rb
uvrb-0.1.1 examples/tty_example.rb
uvrb-0.1.0 examples/tty_example.rb