array-symmetries 0.0.2 → 0.0.3

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 +4 -4
  2. data/lib/array.rb +6 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9842cec8943393c58825134c143058f6f4f8d464179f06db6f628b11a20a4c8
4
- data.tar.gz: 5e8dae59ed50454965fc892b1d934684d04cdcb35a2ce743cb2727c6a3aa1ca0
3
+ metadata.gz: e2e9c7cdb534452b02aaa4f93594d3e0e3a1fdcc641c3bfe6d3710bacb70bdba
4
+ data.tar.gz: 21b30dc1caaf70fef3701e8693b89c84de64012768460decc8f27532bdd9c7c4
5
5
  SHA512:
6
- metadata.gz: 40a35fca610a50f47c84e8ca41d15a8923eaaf56282fe9008d0fa057773271b5aa7266db5ebabdfd0fba9c1440ed96e69edc62b073ae3de3560701763a652683
7
- data.tar.gz: 92ebf86744bae7ace0831f795526fec94fae4823d36596b3c309ebc20fd3e01566edcad8f52259cbba8f76c464dd6510c87e7c915c74e5ed950336c1c10046b2
6
+ metadata.gz: e75cdd082d1e142347f3fb7d6edfb1f0c0e171c42913d132ac95861140e95e3887a01678d85dddfe47f7f8c8e0dd27c4e6b13a9f09598269b298c329b8443aa5
7
+ data.tar.gz: 2801208239461b0b85cd653329bebf7d9b140b359ca0afd9dcb37fc405e51291b1c3e9541faba116a08efc60cc13427da804f8f6f35d3e46b10b81425156d4fc
@@ -25,5 +25,11 @@ class Array # yeah it's a monkey patch
25
25
  raise ArgumentError unless square?
26
26
  [self, b, a, a.a, a.a.a, a.b, a.a.b, a.a.a.b]
27
27
  end
28
+
29
+ # Returns a 2x2 array consisting of the four corners of the original square.
30
+ def corners
31
+ raise ArgumentError unless square?
32
+ [[first.first, first.last], [last.first, last.last]]
33
+ end
28
34
  end
29
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: array-symmetries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorraine Lee