parity_prop_fge 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/parity_prop.rb +8 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3eaec351b880beab7af83d0132733b815fa97a27c0fc153470e76509c774ce76
4
+ data.tar.gz: 8137e629e76ddedc4228d7303b2b415ca82928568d6ca42bf3c3e0d16f655a4d
5
+ SHA512:
6
+ metadata.gz: 3b08cad3dcff190c9f8a8194844c386e86933dc0730297cfb6a86a9fabd85de5096165479c18b35e464d9003312a0f1277dfdf872ab0c371bd4cde61367548b1
7
+ data.tar.gz: a2b5be0bdbeeb1a157ae924fcc9dca2eb59dfa93b05970e865dcbc51f1e3eed32394f6b9f288982d4c321c2c387a7321a2ad1d59a2621925026c5a75c34c6f41
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # open Array class and add method split_by_parity
4
+ class Array
5
+ def split_by_parity
6
+ partition(&:even?).flatten
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: parity_prop_fge
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Richard Logwood
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-09-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/parity_prop.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.4.19
39
+ signing_key:
40
+ specification_version: 4
41
+ summary: A first gem exercise that splits an array of integers into two arrays, one
42
+ with even numbers and one with odd numbers.
43
+ test_files: []