income-tax 0.2.0 → 0.2.1

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: 635d5c723ad24b9dba8fe3a117678eb75e198a26
4
- data.tar.gz: a3175eae88b38643bd0da70abcce7b40ee878555
3
+ metadata.gz: 67ee8d20356685914aaf57242d7a1cb84a631043
4
+ data.tar.gz: bba76a62100eb3caf7a2b4329e51d11d7ee549e4
5
5
  SHA512:
6
- metadata.gz: 98ac83c0cbe0a9d868d288653257c264c13a91646d9f0b0a7d5c197db69009178ef9f2b4a167206384703274dda7c60f62eb0d030518a590bc8b55c28df311f0
7
- data.tar.gz: ee562313ea58d142de283e22e78f79add8c0bb7d0de1033511d418aae11f547bc0b94793d067aff70881da80448471cf33eb1f95bedfb90c41abe6bed2fcb3b8
6
+ metadata.gz: 7bec96d7e3d4b1362aaeb5366af2224ccb6f4254c8ff3b20c8f6a5bb026d3d291b30102c40e369d5e8b17655e3a7a433b709951665136439267a4973fdd4ee74
7
+ data.tar.gz: 00ee3d234cbbf65e9637d174d35a3f22a0eef00b5a8ca3159178885f47ba4d7b0cb0325f40dba57379e582464c386e3c2ae3ca1c6aaedebc971e4d843037c617
@@ -1,7 +1,7 @@
1
1
  module IncomeTax
2
2
  module Factory
3
3
  PATTERN = /^[€$£]?\d+(?:(?:\.\d)?[km])?(?:\/mo)?$/i
4
- MONEY = -> o { defined? ::Money and o.is_a? Money }
4
+ MONEY = -> o { o.respond_to? :to_money }
5
5
  private_constant :PATTERN
6
6
  extend self
7
7
 
@@ -47,7 +47,7 @@ module IncomeTax
47
47
  value = value.to_i * 12 if month
48
48
  Integer(value)
49
49
  when MONEY
50
- value = value.exchange_to(location.currency)
50
+ value = value.to_money.exchange_to(location.currency)
51
51
  value.amount
52
52
  when Integer, BigDecimal
53
53
  value
@@ -1,3 +1,3 @@
1
1
  module IncomeTax
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: income-tax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Estimate Income Tax for different Countries
14
14
  email: income-tax-gem@rkh.im