galaxy_converter 3.1.1 → 3.1.2
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/galaxy_converter/note.rb +3 -3
- data/lib/galaxy_converter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7f0865539e739036e79313e9d9b65227d3b0cc1d22e5156332a39f642098500
|
|
4
|
+
data.tar.gz: 5d9f6de7ef78706cf1380b5c199e97b3703c17d4ffea755e8669d2420911213a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cb4fb0d5580bdc0642dda78eb2b2ba58300272474eb4e94ab2a9a4e1b0d88aeb95ee1362d33fce1d1400781b1da3bd52913985eac93b9ff8aa70d9c2ec068c1
|
|
7
|
+
data.tar.gz: d1be7f1f07456e668694cc4dd8e29e73c1f1f0fa9223340766eb53650c412a22e6ab21543ffa771745d0f0fd686355f5a7f25663808807e3a81881e3451e9ae9
|
|
@@ -3,10 +3,11 @@ module GalaxyConverter
|
|
|
3
3
|
PREFIXES = ["how much is", "how many credits is"]
|
|
4
4
|
QUESTION = "?"
|
|
5
5
|
NO_IDEA = "I have no idea what you are talking about"
|
|
6
|
+
CREDITS = "credits"
|
|
6
7
|
|
|
7
8
|
def self.from(notes)
|
|
8
9
|
Array(notes).map do |body|
|
|
9
|
-
klass = body.index(/
|
|
10
|
+
klass = body.index(/#{CREDITS}/i) ? Credit : Note
|
|
10
11
|
klass.new(body)
|
|
11
12
|
end
|
|
12
13
|
end
|
|
@@ -43,8 +44,7 @@ module GalaxyConverter
|
|
|
43
44
|
|
|
44
45
|
class Credit < Note
|
|
45
46
|
def answer(total = 0)
|
|
46
|
-
|
|
47
|
-
s << " Credits"
|
|
47
|
+
super << " #{CREDITS.capitalize}"
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
private def detect
|