alicewinthrop_palindrome 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/alicewinthrop_palindrome.rb +10 -2
- data/lib/alicewinthrop_palindrome/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8b75e75f6437620c3bcbf6b553934bed00bc0b846379a8536a00704a4f7d4ba
|
4
|
+
data.tar.gz: 2394714aa03a112ac8b1643edb9110336507c87322b06271a1ba6dbd9bb1e0af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 778385b3fab42d3b81a99e840982d5b6d72e94a048f9678a28cc99a954220260864ed467226d7df2c576554c3441c0121ce8cbedf78e74afe14e118e1fb4cf7d
|
7
|
+
data.tar.gz: f032332fb5b609d21ba8a7beb8e006bec14ed713d5dd14bae91e73bd9e2cfc19a34a39a5efc02673eafc5d19abc37deb5a70fbac42a5bc04e0d3335b4b12f461
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "alicewinthrop_palindrome/version"
|
2
2
|
|
3
|
-
|
3
|
+
module AWinthropPalindrome
|
4
4
|
|
5
5
|
# Returns true for a palindrome, false otherwise.
|
6
6
|
def palindrome?
|
@@ -11,6 +11,14 @@ class String
|
|
11
11
|
|
12
12
|
# Returns content for palindrome testing.
|
13
13
|
def processed_content
|
14
|
-
scan(/[a-
|
14
|
+
to_s.scan(/[a-zA-Z0-9]/).join.downcase
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
class String
|
19
|
+
include AWinthropPalindrome
|
20
|
+
end
|
21
|
+
|
22
|
+
class Integer
|
23
|
+
include AWinthropPalindrome
|
24
|
+
end
|