bing_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: 40f3d7eb539c286db385cd93e459667e230c6ec1351ceedb5616583780443dd7
4
- data.tar.gz: 28f5525af58fe5e48db81edf4e97b9c7ec91a6b62fd7f05e0f0f3f5a7ccdf876
3
+ metadata.gz: '09b8a3fd7f3c308de7e184d56c93bf619091e451e795524a239404f81da72703'
4
+ data.tar.gz: 194bcbdd892558f26ad50ba477e10a5f90b9aac307b49c2e4fea5eb718f6859f
5
5
  SHA512:
6
- metadata.gz: 07edef5fe5f14d037037eef1bf2f4876905d3f336fff96074f4c277990d73358f2170269f6105092a38481f1d0ded4b767c01e4b10d56929833475ff44b1f489
7
- data.tar.gz: 8378670ae909f926b9abd4a79bc96b3079be3d62202d56c70f09dfb071b5cbe92fbccd7dadec1b947603988ffbb5f53f570144d5da094ceb6734607562179b0b
6
+ metadata.gz: 6581a13302d4656a345492c7fd34a25144f187bf9a498e17eaf481a5b2d4a10218b9eb86eddb0f97c78942ce6bba9b7147725df253b0822d03c3434aa5848837
7
+ data.tar.gz: 248d169f459fef292791d0925f9fc6046ed0cd72ef6386b59336b05a00c165779a73f789a7b44fc825224f8a074ec82e238813a50eac84b7b3244e55a761a81c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bing_palindrome (0.1.0)
4
+ bing_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,6 @@
1
1
  require "bing_palindrome/version"
2
2
 
3
- class String
4
-
3
+ module BingPalindrome
5
4
  # Returns true for a palindrome, false otherwise.
6
5
  def palindrome?
7
6
  processed_content == processed_content.reverse
@@ -11,7 +10,14 @@ class String
11
10
 
12
11
  # Returns content for palindrome testing.
13
12
  def processed_content
14
- self.scan(/[a-z]/i).join.downcase
13
+ self.to_s.scan(/[a-z\d]/i).join.downcase
15
14
  end
15
+ end
16
16
 
17
+ class String
18
+ include BingPalindrome
17
19
  end
20
+
21
+ class Integer
22
+ include BingPalindrome
23
+ end
@@ -1,3 +1,3 @@
1
1
  module BingPalindrome
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: bing_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
  - Bing Li