timmylu_palindrome 0.1.0 → 0.1.1

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: 4dfd2b5ec2c65c2c4de064b420aad6f76532796bad9305e3b1bfa4f8047fd187
4
- data.tar.gz: a929733b21883daa6db706fcb67001075ce02d6984877cd1e26e759c195e7b6c
3
+ metadata.gz: 54f399b3c546852d594427e2d2224f78bdd2496e33869262d8a609d403a24f6e
4
+ data.tar.gz: a4419bc0eb1e22ea4679a1462e2f506cf7b1a4dd18fa803a101ae8b051fb03fa
5
5
  SHA512:
6
- metadata.gz: ef204bf2fc348a5a62d9c8380dc2ac3eb7c86fa822eb31ac1c923ee1da33b2b14e978ba65942a62e6338949eda947641bc9166607beee1943e6dbcbcef6df33e
7
- data.tar.gz: 7aa07a679e70ac8298c631b5524070099b99b869126ed6566f02b2da142d8539cbe47dc2ef0029334ce52e5d41b0487c40b903d9d4de904af4fe5164ff8fbf9e
6
+ metadata.gz: 4fc4a632e8c3c7f0cf18998ae23e4e0e8e97b1b60f9e083f3a3c11c7dd6de99edd412913ccb472ff47814e3852c3b400730438093e32aab194ae35780ab717f0
7
+ data.tar.gz: 65ce5cba430edbe6510c1ff3c18fae1875e1e29500bd9cbd3c916e3ae0191d9727c51b3f130e9f4e17fd71666751a867e3d3fd377b2c7726f7e6f92e4539b445
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- timmylu_palindrome (0.1.0)
4
+ timmylu_palindrome (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,8 +2,7 @@
2
2
 
3
3
  require_relative "timmylu_palindrome/version"
4
4
 
5
- class String
6
-
5
+ module TimmyluPalindrome
7
6
  # Returns true for a palindrome, false otherwise.
8
7
  def palindrome?
9
8
  processed_content == processed_content.reverse
@@ -16,7 +15,14 @@ class String
16
15
 
17
16
  # Returns content for palindrome testing.
18
17
  def processed_content
19
- self.to_s.downcase.scan(/[a-zA-Z]/).join
18
+ self.to_s.downcase.scan(/[a-zA-Z\d]/).join
20
19
  end
20
+ end
21
+
22
+ class String
23
+ include TimmyluPalindrome
24
+ end
21
25
 
26
+ class Integer
27
+ include TimmyluPalindrome
22
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TimmyluPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timmylu_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas-lui