johncoryk_palindrome 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f49097e616b6a1654c7027c3afd00198717fa79e32b5ccb7fa8b23ce520a985d
4
- data.tar.gz: e4edae944586fd3547f72b0ec9c67295d53847ef4221d68b079e57e7f2f60235
3
+ metadata.gz: 7df0c3be183c2c45ed3ea262eb45f78040049b8c45c33e7ffb71d6537c16cb74
4
+ data.tar.gz: f8060bf13c7c1426089967fa37d120fb9251c0e757f71fb0daab2a47b6900c30
5
5
  SHA512:
6
- metadata.gz: 00ce0844b688b1d0b129b745beea7c5dc849c9bdaaec2b7fcace3f263daeb5fa988ee38d886d49ae0de8230e498ebe7fb86f55d3963a66093a103d1143338266
7
- data.tar.gz: 6b88aef3b0423c55b5907cb27e7e945cd55fde777d9d36edd37f85872d88f1c9b494e6d75d35dfcd7a1448e2a519c424da39521b5199d7f0c2991a812fbdd7f8
6
+ metadata.gz: cecd08d7742ae7afd26cceee1796addacbc5b8dfc26feaf33552661478a4decdfd387c38b968b0c39a5c9b8eaaad9c25ffbc8e0bde63a93cb09f16d902b2f150
7
+ data.tar.gz: 344124e8d202393bfceb87cbecba0798b5a3664adb7feb350bcccb47c37db55c30ae71dc543a8840ae1b19a95c08e82f85019ca8690f0285cf86d788c0bd6ecc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- johncoryk_palindrome (0.1.0)
4
+ johncoryk_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,6 +1,8 @@
1
1
  require "johncoryk_palindrome/version"
2
2
 
3
- class String
3
+ require 'johncoryk_palindrome/version'
4
+
5
+ module JohncorykPalindrome
4
6
  def palindrome?
5
7
  processed_content == processed_content.reverse
6
8
  end
@@ -8,6 +10,14 @@ class String
8
10
  private
9
11
  # Processes the string for palindrome testing.
10
12
  def processed_content
11
- scan(/[a-z]/i).join.downcase
13
+ to_s.scan(/[a-z\d]/i).join.downcase
12
14
  end
13
15
  end
16
+
17
+ class String
18
+ include JohncorykPalindrome
19
+ end
20
+
21
+ class Integer
22
+ include JohncorykPalindrome
23
+ end
@@ -1,3 +1,3 @@
1
1
  module JohncorykPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johncoryk_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory Kelley