what_is 0.0.2 → 0.0.3
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/version.rb +1 -1
- data/lib/what_is.rb +8 -0
- 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: 96827a06dbd3e84d6cc2922de77a77dd666efa31
|
4
|
+
data.tar.gz: 5ea5f4612b47af9e28d6c1c49bbe93328af4893e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30f06c334b5aceccb765ebe52d6b5d87fe35bd3f573126a4e58a2125d58950afb8d542de56411b7281e3153ee41f135f89ded9c28d3ed7c5f276f6327b3b764
|
7
|
+
data.tar.gz: 3a99c9dd366d1bc2ae8aedc83b33cba2f418fef40fe93c7e9ae8f16f542dfbf3e8437e1233f56eacedc97370b3dfced2a2b58fedeca1482711eb9d1d567249dd
|
data/lib/what_is/version.rb
CHANGED
data/lib/what_is.rb
CHANGED
@@ -18,10 +18,18 @@ module WhatIs
|
|
18
18
|
response = Net::HTTP.get_response(uri)
|
19
19
|
|
20
20
|
response.body
|
21
|
+
rescue
|
22
|
+
default_exception_message
|
21
23
|
end
|
22
24
|
|
23
25
|
def has_definition?
|
24
26
|
@has_definition
|
25
27
|
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def default_exception_message
|
32
|
+
"Oops. Something happened while defining this word"
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|