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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c23eb6ec6f4ca661b58e1b16f80a001a2e2fe815
4
- data.tar.gz: 5fd442f1412059303f1120ae1ce3eda743143ccd
3
+ metadata.gz: 14e73c9dda8860c812258e3210b1a0d7c0ba061d
4
+ data.tar.gz: 99afae4938a5ce0930d69108925b8e22c68a2992
5
5
  SHA512:
6
- metadata.gz: 5dd87b81d1680082e96af90f020750871d23b17353483598208db10c420b4856e29063f05332057dbe040502d5561c45c3a089b11c0974f432e1608d65419acc
7
- data.tar.gz: c63d99b585d42550646208a7bb15ee7e0bf0cc89e4a4bee5754179bb6224b20f630785390a3b00d421eea8fd3887be1494234eb334e9ab185788763e08fcbfca
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
- e.message
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
@@ -1,3 +1,3 @@
1
1
  module WhatIs
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  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: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez