my_hash_diff_2 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/my_hash_diff_2.rb +6 -0
  3. metadata +42 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6da3e8dc79a0d42718dd943d9e98697d7db478724fafc61684455a4658c20ab9
4
+ data.tar.gz: 901b2cbb7a32a50413efcbe54e993f13474c0894633f619443ceab537dc8dbc7
5
+ SHA512:
6
+ metadata.gz: 709538fb8511ac50f5ac31e5cdc5dbc6c7280da928d6d28c1232d87895b1770d824c06c6c701fbab9021131ec2083014d616a2ff7a7d0e9b9ce17933f111a2c7
7
+ data.tar.gz: d30c821d39c9849a81d2f4988695e4f4b39b7f6016b6f10419e04838d3f8ec32f28a21d426fb10315dcc7a7db6d957e616653095a14fd5ce70477e76386a7a62
@@ -0,0 +1,6 @@
1
+ class Hash
2
+ def my_diff(hash2)
3
+ difference = self.to_a - hash2.to_a
4
+ Hash[*difference.flatten]
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,42 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my_hash_diff_2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alexandru Rusu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/my_hash_diff_2.rb
20
+ homepage:
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - lib
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubygems_version: 3.3.26
39
+ signing_key:
40
+ specification_version: 4
41
+ summary: This gem provides a method to differ two Hashes
42
+ test_files: []