ruboty-ruby_persistence 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f9678cb901da05598d448e5f5ccbc33ce72270e
|
4
|
+
data.tar.gz: bf8e16ed9201ccc4f5223d45fb0f2a9904cdd021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a7ac650e5c9cc1a3b1a24dd68b842d876aaf42b63c143e8bbf99fa990de39ad5637549bc539dda114588d52df7567e798a45d9b02a7ed16c641372a3dddf952
|
7
|
+
data.tar.gz: eb187a01d908669f04929957d0deb36843c3f54827401db13c80ac9acddde9358521c38e899dc006dacd3a8f67804e981fbe78456bb9f2d7c56bf79e0be6d3f1
|
@@ -51,9 +51,9 @@ module Ruboty
|
|
51
51
|
def set_and_persist(message)
|
52
52
|
name = message[:name]
|
53
53
|
result = eval(message[:code])
|
54
|
-
context.define_method
|
54
|
+
context.__send__(:define_method, name) { result }
|
55
55
|
variables[name] = result
|
56
|
-
message.reply("`#{name}` is now `#{result.
|
56
|
+
message.reply("`#{name}` is now `#{result.inspect}`")
|
57
57
|
rescue Exception => exception
|
58
58
|
message.reply("#{exception.class}: #{exception}")
|
59
59
|
end
|