Class: Ruboty::Handlers::Evaluate
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::Evaluate
- Defined in:
- lib/ruboty/handlers/evaluate.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(message) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ruboty/handlers/evaluate.rb', line 6 def evaluate() thread = Thread.start do result = `#{message[:command]}`.chomp! .reply(result) end Thread.start do sleep 10 thread.kill end end |