goog_currency 1.0.1 → 1.0.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.
@@ -7,7 +7,7 @@ module GoogCurrency
7
7
  def self.method_missing(meth, *args)
8
8
  from, to = meth.to_s.split("_to_")
9
9
 
10
- if from.nil? or to.nil?
10
+ if from.nil? or to.nil? or from == "" or to == ""
11
11
  raise NoMethodException, "GoogCurrency accepts methods in 'usd_to_inr' or 'gbp_to_usd' format"
12
12
  end
13
13
 
@@ -41,6 +41,16 @@ module GoogCurrency
41
41
  end
42
42
  end
43
43
 
44
+ def self.respond_to?(meth)
45
+ from, to = meth.to_s.split("_to_")
46
+
47
+ if from.nil? or from == "" or to.nil? or to == ""
48
+ super
49
+ else
50
+ true
51
+ end
52
+ end
53
+
44
54
  class Exception < StandardError; end
45
55
  class NoMethodException < StandardError; end
46
56
  end
@@ -1,3 +1,3 @@
1
1
  module GoogCurrency
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goog_currency
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  segments:
107
107
  - 0
108
108
  version: '0'
109
- hash: 3660476117769931034
109
+ hash: -3145799716423945141
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  segments:
116
116
  - 0
117
117
  version: '0'
118
- hash: 3660476117769931034
118
+ hash: -3145799716423945141
119
119
  requirements: []
120
120
  rubyforge_project:
121
121
  rubygems_version: 1.8.25