what_is 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/what_is.rb +6 -2
- data/lib/what_is/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14e73c9dda8860c812258e3210b1a0d7c0ba061d
|
4
|
+
data.tar.gz: 99afae4938a5ce0930d69108925b8e22c68a2992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3add36fb8a6b1645b8de7691a0dd580b353547ea16334c951afc5c83cd74adfd7cb146dc8eb8e27ab0dde185720712bdc84766a0bdf3734803ccd7f051bb3c3
|
7
|
+
data.tar.gz: 714ea921fb6f31c3f3e72446f60d90da5797fae94c24139a96dfe055f12282445e5793376df301cdb555dc5578ad9bb94c16bff88f7e5a74e3535e9d6cb20651
|
data/lib/what_is.rb
CHANGED
@@ -37,7 +37,7 @@ module WhatIs
|
|
37
37
|
rescue NoApiKeyException => e
|
38
38
|
no_api_key_exception_message
|
39
39
|
rescue Exception => e
|
40
|
-
|
40
|
+
default_exception_message
|
41
41
|
end
|
42
42
|
|
43
43
|
def has_definition?
|
@@ -46,8 +46,12 @@ module WhatIs
|
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
|
+
def default_exception_message
|
50
|
+
"ERROR: Unable to define `#{@word}`"
|
51
|
+
end
|
52
|
+
|
49
53
|
def no_api_key_exception_message
|
50
|
-
"No api key provided."
|
54
|
+
"ERROR: No api key provided."
|
51
55
|
end
|
52
56
|
end
|
53
57
|
end
|
data/lib/what_is/version.rb
CHANGED