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 +4 -4
- data/lib/income_tax/factory.rb +2 -2
- data/lib/income_tax/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ee8d20356685914aaf57242d7a1cb84a631043
|
4
|
+
data.tar.gz: bba76a62100eb3caf7a2b4329e51d11d7ee549e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bec96d7e3d4b1362aaeb5366af2224ccb6f4254c8ff3b20c8f6a5bb026d3d291b30102c40e369d5e8b17655e3a7a433b709951665136439267a4973fdd4ee74
|
7
|
+
data.tar.gz: 00ee3d234cbbf65e9637d174d35a3f22a0eef00b5a8ca3159178885f47ba4d7b0cb0325f40dba57379e582464c386e3c2ae3ca1c6aaedebc971e4d843037c617
|
data/lib/income_tax/factory.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module IncomeTax
|
2
2
|
module Factory
|
3
3
|
PATTERN = /^[€$£]?\d+(?:(?:\.\d)?[km])?(?:\/mo)?$/i
|
4
|
-
MONEY = -> o {
|
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
|
data/lib/income_tax/version.rb
CHANGED
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.
|
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-
|
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
|