Class: Ruboty::Handlers::Ruby
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::Ruby
- Defined in:
- lib/ruboty/handlers/ruby.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(message) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/ruboty/handlers/ruby.rb', line 12 def evaluate() .reply(eval([:code])) rescue Exception => exception body = "#{exception.class}: #{exception}" .reply(body) Ruboty.logger.debug([body, exception.backtrace].join("\n")) end |