epogue_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: 58d57ed1924114a9222c4faa2e04b650ea434ad0fc39e3898d31ceea085f736c
4
- data.tar.gz: 548077e8afea85ececdcae4692d90a19ee31bcea323aa85e2c9dc8b2a3c87d1d
3
+ metadata.gz: 33b5fb7721c5e46490e5f4dc88e7bd3fcb67971e7838f2837c4fa83e65b18a35
4
+ data.tar.gz: 7be568d72e2bbe1f0fe4dd9ec609844bb869801c25be54056ceb1ce5ace111a4
5
5
  SHA512:
6
- metadata.gz: 959e991dabc8b1af3aa30c1717b35f84a10646192360a0ed6e727421d5227729a13c1700e8ddf310b7cb3d0514370949f791d7b644bee47484101bfd4b0d0662
7
- data.tar.gz: 144007798a92ac151096683a37bc2a10884970df7dc8fba5525335746d802e75bfa7274f5ad2bc2b5646413f3602e156f73444716c4399db2f00488d887c0716
6
+ metadata.gz: b3c32ae419956f9f9c24f7df4ecae7c790a611e768282dee31665ecba8c90b41e81637974495e54e5284ff6472b03e20ea9f26ee5776b1ae32cf4caa0d0a725f
7
+ data.tar.gz: b39dafe1b4b0da0b4611cd8b4efe22c6bdc479b0e23a4eca97ada39ab73a89d367f7bd92b3d8d77fb9b2c1715526497286fbb1807d82b93a9a1e50c2ca8558f5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- epogue_palindrome (0.1.0)
4
+ epogue_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module EpoguePalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,17 +1,25 @@
1
1
  require "epogue_palindrome/version"
2
2
 
3
- class String
4
-
5
- # Returns true for a palindrome, false otherwise.
6
- def palindrome?
7
- processed_content == processed_content.reverse
8
- end
3
+ module EpoguePalindrome
9
4
 
5
+ # Returns true for a palindrome, false otherwise.
6
+ def palindrome?
7
+ processed_content == processed_content.reverse
8
+ end
9
+
10
+
11
+ private
12
+
13
+ # Returns content for palindrome testing.
14
+ def processed_content
15
+ self.to_s.scan(/[a-z\d]/i).join.downcase
16
+ end
17
+ end
10
18
 
11
- private
19
+ class String
20
+ include EpoguePalindrome
21
+ end
12
22
 
13
- # Returns content for palindrome testing.
14
- def processed_content
15
- self.scan(/[a-z]/i).join.downcase
16
- end
23
+ class Integer
24
+ include EpoguePalindrome
17
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epogue_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
  - Eric Pogue