jalmquist_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: 0bb81500e54b18637298545982603169ba59024af5a19ee5add856b419bbf06f
4
- data.tar.gz: 8316d2659721046a68a01fd77dff0e9288a7d1e259afd046878bc4cecea46e38
3
+ metadata.gz: 1c8ec837370e9ca244897f3ac517d66d2ade82994f9a594451b5b144bca9bea1
4
+ data.tar.gz: c4f89658fa3dc404defe1eca8f7c1c2a80dee48e96d73398046a0f0f468f3d36
5
5
  SHA512:
6
- metadata.gz: 3fc37a7175bfbcc06401b292f0fea94c366e88800c3067d6582b10a686781e447dcdac0c903c9f04fd99588c28c0289a4b6c81429adc9e8ebf4b300b2fed6822
7
- data.tar.gz: 7d7ad2380ac6082a919d91cd93a5cc9acadc3a938c4ccf3ad5b6566e74855537264b296147d7e28bd9430dab03ca68218d757cd790daf32c7d354e8afe15e49e
6
+ metadata.gz: 0073c7c85e270a27d1c5407595325780f2d44af2296b473645faed1ca4d6d0c010de1674bc61b119781b036cd5bd21ab406feaa0221c29c6b60636f77155ece8
7
+ data.tar.gz: 9e8dc8cd5aa82eea63ab4181d173861472bb4aed6baf842b0ee555d8aede6b89c6e3a5183e02ae60d008764b3992106e85fbbe79bf09d275765d4877520368de
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jalmquist_palindrome (0.1.0)
4
+ jalmquist_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -12,7 +12,8 @@ module JalmquistPalindrome
12
12
  end
13
13
  =end
14
14
 
15
- class String
15
+ module JalmquistPalindrome
16
+
16
17
  # Returns true for a palindrome, false otherwise.
17
18
  def palindrome?
18
19
  processed_content == processed_content.reverse
@@ -27,6 +28,14 @@ class String
27
28
 
28
29
  # Returns content for palindrom testing
29
30
  def processed_content
30
- scan(/[a-z]/i).join.downcase
31
+ to_s.scan(/[a-z0-9]/i).join.downcase
31
32
  end
32
33
  end
34
+
35
+ class String
36
+ include JalmquistPalindrome
37
+ end
38
+
39
+ class Integer
40
+ include JalmquistPalindrome
41
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JalmquistPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jalmquist_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
  - jamesalmquist