Class: Qbot::Adapter::Shell
Defined Under Namespace
Modules: Keyboard
Instance Method Summary collapse
- #close ⇒ Object
- #listen(&block) ⇒ Object
- #post(text, **options) ⇒ Object
- #reply_to(message, text, **options) ⇒ Object
Methods inherited from Driver
Instance Method Details
#close ⇒ Object
34 35 36 |
# File 'lib/qbot/adapter/shell.rb', line 34 def close EM.stop end |
#listen(&block) ⇒ Object
30 31 32 |
# File 'lib/qbot/adapter/shell.rb', line 30 def listen(&block) EM.run { EM.open_keyboard(Keyboard, block) } end |
#post(text, **options) ⇒ Object
38 39 40 |
# File 'lib/qbot/adapter/shell.rb', line 38 def post(text, **) $stdout.puts text end |
#reply_to(message, text, **options) ⇒ Object
42 43 44 |
# File 'lib/qbot/adapter/shell.rb', line 42 def reply_to(, text, **) post(text, **) end |