From 3e4d35e3849d585f7c963cd41d2e48abc48494f7 Mon Sep 17 00:00:00 2001 From: Daniel Muckerman Date: Fri, 9 Oct 2015 18:34:01 -0400 Subject: [PATCH] Add Math? --- slack-mathbot/commands/calculate.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slack-mathbot/commands/calculate.rb b/slack-mathbot/commands/calculate.rb index 394b628..2a961ea 100644 --- a/slack-mathbot/commands/calculate.rb +++ b/slack-mathbot/commands/calculate.rb @@ -1,3 +1,5 @@ +require Math + module SlackMathbot module Commands class Calculate < SlackRubyBot::Commands::Base @@ -5,8 +7,7 @@ module SlackMathbot command 'calculate' def self.call(client, data, match) - result = Dentaku::Calculator.new.evaluate(match[:expression]) - #if match.names.include?('expression') + result = Dentaku::Calculator.new.evaluate(match[:expression]) if match.names.include?('expression') result = result.to_s if result if result && result.length > 0 send_message client, data.channel, result