JohnPaulIII_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: 8e35f68d549062186bae5e4d6a5c66c37731bf0525649a5b7554d8d14a3fe012
4
- data.tar.gz: cd159353d81be1c5a43117f9109c9bb1f4f4c1e7a57e8465aa4f410e00b73eff
3
+ metadata.gz: b78aecb52f3338f3866e10cc63ffa2d8ee8cb9ed2fd4dd11fff631d1ff031575
4
+ data.tar.gz: c0389a82283f80ead634497b704723288aaa8451a394aa745323e8228b8fd6cf
5
5
  SHA512:
6
- metadata.gz: 3f12a129ca44253608d414c3114566da926abec4e87992604c453a855f139604ad28fa98f4856382e6782759356f818888cce64620772d7d100f4d1505502e20
7
- data.tar.gz: 3146aabc7ac441d0a7ad6bf9cc8bb3d596ab99997ad23a32f13ded805e62b5b16e4166ef855465f673da5bf7323fa788d1ad68b477a731a805d0fdae007ac0e6
6
+ metadata.gz: b249c6a80b26ee9614a3aa021f8754d7aa43dd8841aaa3f4b75558b4fef84b1c4c7a358734e2a898f2a0d8bf2d4122b2059748ddd38fdb497e8374781440a29e
7
+ data.tar.gz: c6e492050ad1b718fa00f946798f8218c691e1b2ea2542f931ba9830b7e171e7f9e42675ce9f169d130c87ff21bd0c3fbe4813559092196dc276de20e61947f1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- JohnPaulIII_palindrome (0.1.0)
4
+ JohnPaulIII_palindrome (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JohnPaulIIIPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -2,17 +2,25 @@
2
2
 
3
3
  require_relative "JohnPaulIII_palindrome/version"
4
4
 
5
- class String
5
+ module JohnPaulIIIPalindrome
6
6
 
7
7
  # Returns true for a palindrome, false otherwise.
8
8
  def palindrome?
9
- processed_content == processed_content.reverse
9
+ processed_content == processed_content.reverse && processed_content != ""
10
10
  end
11
11
 
12
12
  private
13
13
 
14
14
  # Returns content for palindrome testing.
15
15
  def processed_content
16
- self.scan(/[a-z]/i).join.downcase
16
+ to_s.scan(/[a-z0-9]/i).join.downcase
17
17
  end
18
18
  end
19
+
20
+ class String
21
+ include JohnPaulIIIPalindrome
22
+ end
23
+
24
+ class Integer
25
+ include JohnPaulIIIPalindrome
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: JohnPaulIII_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
  - John Paul III
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-16 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby palindrome detector
14
14
  email: