bencreating_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: eb3d0bf17e6889766bc3bae225a4a5a90ac4a7564b4ab5f42e9bbf8028376c28
4
- data.tar.gz: fc54cd354980d4b4fdad629a9a3801882751b79535b501f961320c97ad2e4b05
3
+ metadata.gz: afa5ac8cb5953a0616b4d145ec58d14ca4b36fa89017171f9783569132dc3442
4
+ data.tar.gz: bcb905206759d7ccbbb2dc131f2adf7a3923027c7cdeaa2a3ad4a93aa847f7b1
5
5
  SHA512:
6
- metadata.gz: b275ccc58152256c63799edb20040ea6c65bd4653cdcbc4502f600773c2292a9abdfc97fb134b9b2fbbffb81769cc9522d65c7c490ace5af3f3a903b58cc2683
7
- data.tar.gz: 6c1a82c893eb6537b0043e18beed39111c54eeced7825beba0da0bf5e8e3576bb628ed1092c8e8645a4a6479b31daaea053693c3f158275067ba99b4a1ce1471
6
+ metadata.gz: 9a2ada4dfd9b25ef70b826ecab68b1de03b57fc1cb8a6046c052926d817aa9e65214df9cbb3cf957ebb10f6aadb1dd37ce9e0879e23d68e73144437dc7568982
7
+ data.tar.gz: c2ee2ac051f8bf98428149879fbd034845012a006999837eff2fff93cf64ef47dd5ce2a7f745e5d5648cc0aa339783edf1e9c4ce3a9e0bacf76285528c165381
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bencreating_palindrome (0.1.0)
4
+ bencreating_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,9 +1,6 @@
1
- # frozen_string_literal: true
2
-
3
1
  require_relative "bencreating_palindrome/version"
4
2
 
5
- class String
6
-
3
+ module BenCreatingPalindrome
7
4
  # Returns true for a palindrome, false otherwise.
8
5
  def palindrome?
9
6
  processed_content == processed_content.reverse
@@ -13,6 +10,14 @@ class String
13
10
 
14
11
  # Returns content for palindrome testing.
15
12
  def processed_content
16
- scan(/[a-z]/i).join.downcase
13
+ to_s.scan(/[a-z0-9]/i).join.downcase
17
14
  end
18
15
  end
16
+
17
+ class String
18
+ include BenCreatingPalindrome
19
+ end
20
+
21
+ class Integer
22
+ include BenCreatingPalindrome
23
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BencreatingPalindrome
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: bencreating_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
  - Ben Smith