codyjamesbrooks_palindrome 1.0.0 → 1.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md/342/200/235 +4 -1
- data/Gemfile.lock +1 -1
- data/lib/codyjamesbrooks_palindrome.rb +2 -2
- data/lib/codyjamesbrooks_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: 30560f8b75e4d74682fc9a0aa2f2aff8333e8ceeef57dc8421a0ca57ead442c5
|
4
|
+
data.tar.gz: 972f0cd4eea414ce10b35ba73f9f9c2afd1b701db0fe206c5e64730392dadf59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213c5935bd22c02bc1808150ba05e1ad95b4b86ee5bf2c94cbc2bb24751441bc7f20a74493e9e59b6e6e42246c9d2b561c41285eb468b7619757d7aeae515717
|
7
|
+
data.tar.gz: 86a64f90749275f9742d2f693610367dfd1b32f27c157c1039d1fdab8773d455ed5310a1db2519bb7ef1e4143460b4e5e0c9a523f6990f098ec211dab7dba51d
|
data/CHANGELOG.md/342/200/235
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,13 +3,13 @@ require "codyjamesbrooks_palindrome/version"
|
|
3
3
|
module CodyjamesbrooksPalindrome
|
4
4
|
|
5
5
|
def palindrome?
|
6
|
-
processed_content == processed_content.reverse
|
6
|
+
processed_content == processed_content.reverse && !processed_content.empty?
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
10
10
|
# Return content for palindrome testing
|
11
11
|
def processed_content
|
12
|
-
to_s.scan(/[a-z0-9]/i).join.downcase
|
12
|
+
to_s.strip.scan(/[a-z0-9]/i).join.downcase
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|