resident 0.0.12 → 0.0.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f46bb28b43ee9e5b885a50fdad775f2730dfaf059d238bf78f2e4f687f015440
4
- data.tar.gz: 3daabe1d914221094e18cc29032ffd365c3ce497150a3c92c2f9293255772214
3
+ metadata.gz: bf01e9d01d506e8d1679e55d195fbf5b2b68e4f1ea92e071faa067c628ccdeed
4
+ data.tar.gz: 05faa5d541a34c27f6bfd7b3285ca1d7e45b0ec6a8368a76bc989f670bea6f88
5
5
  SHA512:
6
- metadata.gz: c7156a5215a04bf80888f46a88b9d84979dc45097c8480184e58aed0c1b2d6548dbe31dd3e4e018be71e3a0f73e65b30c4601ae2791e96c7e1456c64fd2ba24c
7
- data.tar.gz: 5e3b40279eabe8e69113a8767985e281adc2f7d8d30ffd48e887d8c3d7e4f80072c3fc66ed96825c325e1720b64ed3c47de9af3548cea14dbe37414b62e8cde4
6
+ metadata.gz: c5c5dae1f39cfc92325e801ccbe0af1823578afb21ace71433853d9bd689988789bf263751837589c35b89ffdf8affd2c5588971753393de21b86b5492c889a6
7
+ data.tar.gz: 6796c74e79556f2a291b6e18657551a5300809951c9310fa4dd5f0788f422b84bdd5ddf1b3cad52e9c175f72429a7c317931ae4c9d2bc5ff47b2d3dc408d87ad
@@ -25,6 +25,10 @@ module NationalIdentificationNumber
25
25
  age_for_dob date
26
26
  end
27
27
 
28
+ def ==(other)
29
+ other.class == self.class && other&.to_s == to_s
30
+ end
31
+
28
32
  protected
29
33
 
30
34
  # stackoverflow.com/questions/819263
@@ -74,4 +74,23 @@ describe NationalIdentificationNumber::Base do
74
74
  end
75
75
  end
76
76
 
77
+ describe '#==' do
78
+ it 'should be true if same class and string representation' do
79
+ one = NationalIdentificationNumber::Swedish.new('040626-5488')
80
+ other = NationalIdentificationNumber::Swedish.new('20040626-5488')
81
+ expect(one == other).to be true
82
+ end
83
+
84
+ it 'should be false if other string representation' do
85
+ one = NationalIdentificationNumber::Swedish.new('040626-5488')
86
+ other = NationalIdentificationNumber::Swedish.new('040626-8128')
87
+ expect(one == other).to be false
88
+ end
89
+
90
+ it 'should be false if other class' do
91
+ one = NationalIdentificationNumber::Swedish.new('040626-5488')
92
+ other = NationalIdentificationNumber::Finnish.new('040626-5488')
93
+ expect(one == other).to be false
94
+ end
95
+ end
77
96
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resident
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bukowskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-04 00:00:00.000000000 Z
11
+ date: 2022-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec