|
|
@ -5,7 +5,7 @@ module SlackMathbot |
|
|
|
command 'calculate' |
|
|
|
|
|
|
|
def self.call(client, data, match) |
|
|
|
send_message client, data.channel, match[:expression] |
|
|
|
puts match[:expression] |
|
|
|
result = Dentaku::Calculator.new.evaluate(match[:expression]) |
|
|
|
#if match.names.include?('expression') |
|
|
|
result = result.to_s if result |
|
|
|