parity_prop_stefan 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/parity_prop.rb +5 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 11d538313a03b0a10f0d31383d27497c87aaf3275f1fd7d59dec157ca0423468
4
+ data.tar.gz: ae6339c48eb6245a9b6dfcf6ba84c0a3c96238942ab48eb89dae57b1b9f73ce4
5
+ SHA512:
6
+ metadata.gz: c57935a725232f54abf6f7fff86454bc61dd99fd2be1e5895491855f60bd418794315ba1751197aae78111cf1b3e4b4aa8d90bfde38d1532f706a6131a1f1229
7
+ data.tar.gz: a1fead90289237f4ca546b3e1df55f3ffb413898dad97f294c6f5e8a6261be9bea9ee5e676fb405de7fa75c5ca53eb175c16e42d8c7110b319b55c527110e334
@@ -0,0 +1,5 @@
1
+ class Array
2
+ def split_by_parity
3
+ partition(&:even?)
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: parity_prop_stefan
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Chiciuc Stefan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-08-10 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.3.26
39
+ signing_key:
40
+ specification_version: 4
41
+ summary: A gem that adds a method to Array to split it into two arrays, one with even
42
+ elements and one with odd elements
43
+ test_files: []