ruboty-magi 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ruboty/handlers/magi.rb +20 -0
- data/lib/ruboty/magi.rb +1 -20
- data/lib/ruboty/magi/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d860c894f362cc1007735e84f25ef8af2de4dbf7
|
4
|
+
data.tar.gz: 3e8b77d074cd385526184986ceb2b457a0772014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b83e7ce7ce26e3458d3f98812e29d5fbe4aa969947ff389a1fdda1561ddfcb21278fa585d4f26307d8088edb00af94b5db24ad123f007794f797706db2bf955
|
7
|
+
data.tar.gz: 205104f136a69cb586d071c9c2e60086b8595e36850b59bd5700688d67527097e0351830a492722b3d2d35988d4e7703f28be18caf52fc56f60086c721b29856
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Ruboty
|
2
|
+
module Handlers
|
3
|
+
class Magi < Base
|
4
|
+
on(
|
5
|
+
/magi.*?/i,
|
6
|
+
name: 'answer',
|
7
|
+
description: 'Output result of deliberation'
|
8
|
+
)
|
9
|
+
|
10
|
+
def answer(message)
|
11
|
+
message.reply("MELCHIOR-1:[#{lot}] BALTHASAR-2:[#{lot}] CASPER-3:[#{lot}]")
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
def lot
|
16
|
+
%w(承認 否定).sample
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/ruboty/magi.rb
CHANGED
@@ -1,23 +1,4 @@
|
|
1
1
|
require "ruboty"
|
2
2
|
require "ruboty/magi/version"
|
3
|
+
require "ruboty/handlers/magi"
|
3
4
|
|
4
|
-
module Ruboty
|
5
|
-
module Handlers
|
6
|
-
class Magi < Base
|
7
|
-
on(
|
8
|
-
/magi.*?/i,
|
9
|
-
name: 'answer',
|
10
|
-
description: 'Output result of deliberation'
|
11
|
-
)
|
12
|
-
|
13
|
-
def answer(message)
|
14
|
-
message.reply("MELCHIOR-1:[#{lot}] BALTHASAR-2:[#{lot}] CASPER-3:[#{lot}]")
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
def lot
|
19
|
-
%w(承認 否定).sample
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
data/lib/ruboty/magi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-magi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shulla Cignoir
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
|
+
- lib/ruboty/handlers/magi.rb
|
67
68
|
- lib/ruboty/magi.rb
|
68
69
|
- lib/ruboty/magi/version.rb
|
69
70
|
- ruboty-magi.gemspec
|