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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3777280267634b44ee778b97a4e4a437442a0de6
4
- data.tar.gz: f9a65caaab2c15997a99add79e3eaacad7eb330a
3
+ metadata.gz: 96827a06dbd3e84d6cc2922de77a77dd666efa31
4
+ data.tar.gz: 5ea5f4612b47af9e28d6c1c49bbe93328af4893e
5
5
  SHA512:
6
- metadata.gz: ea906355fd3ab959172cd53f10622350a3bacc390418b54f6c3981cf01482ed3d8001d947ec1af8b2a3bc47a94d220f5302ed83366b5a551895f23ee7f986f61
7
- data.tar.gz: 649020d5be74e79d59d3149259c309d7a6291d362b6cf5f8431807531a6a9d092e3f43088c37670f787b194a8a600381c4fe088b6e45e06a93305d1354b5a9f1
6
+ metadata.gz: d30f06c334b5aceccb765ebe52d6b5d87fe35bd3f573126a4e58a2125d58950afb8d542de56411b7281e3153ee41f135f89ded9c28d3ed7c5f276f6327b3b764
7
+ data.tar.gz: 3a99c9dd366d1bc2ae8aedc83b33cba2f418fef40fe93c7e9ae8f16f542dfbf3e8437e1233f56eacedc97370b3dfced2a2b58fedeca1482711eb9d1d567249dd
@@ -1,3 +1,3 @@
1
1
  module WhatIs
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: what_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez