social_security_number 0.1.11 → 0.1.12

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: 1b4802cd8394f8bb33c42dc0260ead42ba29350d
4
- data.tar.gz: 5e871a66cae45ab5be977db5eb7d28ab6ae0314c
3
+ metadata.gz: 3f573122c369f872eb57d4b1b42092ffa6a53c31
4
+ data.tar.gz: da7007ba083db264bedca8e0481185d491b9c85e
5
5
  SHA512:
6
- metadata.gz: ca998f71f67f0b9b1d041466148b2e0b7500497fd4497ece2fa92d9846385ccd2b58ceca6a6cedc2812a36485d5cd7a653f2482fb61b44900932c387aae4137c
7
- data.tar.gz: 03e8e95bd1d82badd3a97e4b9dd086dcdd6daaecb0b069d97c6d87e1edebebe555ccdcb48a645f87f78257ba813ffb88b3e66363c381b67ca6998eb5ef3b00dd
6
+ metadata.gz: 531f131d3add230b8b99843f15edd6d5b72d90188afe5fe35145a338865c1abec2aadae59f9f1b12e40fb515ae3d2b09bdf76dd4e027c857162a9ee398fdddd4
7
+ data.tar.gz: 650ad119c48d2e4e4c7dfd8af360ca850463db7158444e58654d99489dfc417058c02aa1d4bf163757f0fa70b2d2b8aea2644e00f14765e00e3736ae0783ee26
@@ -14,12 +14,6 @@ module SocialSecurityNumber
14
14
 
15
15
  def year
16
16
  if @parsed_civil_number
17
- base = case @parsed_civil_number[:year].to_i
18
- when 1..40 then 2000
19
- when 40..99 then 1900
20
- else
21
- 0
22
- end
23
17
  @year = base + @parsed_civil_number[:year].to_i
24
18
  else
25
19
  0
@@ -54,5 +48,14 @@ module SocialSecurityNumber
54
48
  sum += weight < 10 ? weight : weight - 9
55
49
  end
56
50
  end
51
+
52
+ def base
53
+ case @parsed_civil_number[:year].to_i
54
+ when 0..40 then 2000
55
+ when 40..99 then 1900
56
+ else
57
+ 0
58
+ end
59
+ end
57
60
  end
58
61
  end
@@ -1,3 +1,3 @@
1
1
  module SocialSecurityNumber
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_security_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - SameSystem
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-09 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler