Class: Repp::Handler::Shell
- Inherits:
-
Object
- Object
- Repp::Handler::Shell
- Defined in:
- lib/repp/handler/shell.rb
Defined Under Namespace
Modules: KeyboardHandler
Class Method Summary collapse
Class Method Details
.run(app, options = {}) {|_self| ... } ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/repp/handler/shell.rb', line 19 def self.run(app, = {}) yield self if block_given? application = app.new @ticker = Ticker.task(application) do |res| if res.any? $stdout.puts res.first end end @ticker.run! EM.run { EM.open_keyboard(KeyboardHandler, application) } end |
.stop ⇒ Object
33 34 35 |
# File 'lib/repp/handler/shell.rb', line 33 def self.stop EM.run { EM.stop } end |