nwoliver_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: 8f119c1df4ed506fbf970540c721805b3795524d1315d3b2115362630cd4b5df
4
- data.tar.gz: a58ea22093579a897f646eb2831f9cb72cbd14de1617db2fe93314afe16abb22
3
+ metadata.gz: 232fa1d783b404127f8cd3d8aa0c2a4e7023e8c04166f67c09c399bde29341cf
4
+ data.tar.gz: db172e6656bc11b841f7d27391c3667fdc4f2ae1ccb2a1c612cf220ba41a7967
5
5
  SHA512:
6
- metadata.gz: 214eb0c54edfe4552de3418f0c08cac57a98f80066ce4dff2285fdf8624c4127e7764e73cdb8af14967ac8d4c514034f032436320d7a4a571209effd4e9a7d1e
7
- data.tar.gz: fed6a8f9e93e4b3cc640547c31c549aacfb29eaf0e09b735818a023a40483db3366ab2f870f6370d43859f16f1be5cb9550998bf7fdacb3cbec0c0c3ed632298
6
+ metadata.gz: 12f1aa93dd53925c87b106dd7280df728d852cd3686ab27ccdd7d823904b342b9e1567329d85b9762563f137f894a474a33149b475f5bba5bd6dc0c2e8148ad4
7
+ data.tar.gz: 6225e803744d7d09a09dee437bd0aee420247b5973c3ec64e602ea486c01d8f0e8fee4f44cfa9f991c9d8e2f546344a7442892e5ca3e42160a3f23dcc649a586
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nwoliver_palindrome (0.1.0)
4
+ nwoliver_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,19 +1,20 @@
1
1
  require "nwoliver_palindrome/version"
2
2
 
3
- # module NwoliverPalindrome
4
- # class Error < StandardError; end
5
- # # Your code goes here...
6
- # end
7
-
8
- class String
9
-
10
- def palindrome?
11
- processed_content == processed_content.reverse
12
- end
3
+ module NwoliverPalindrome
4
+ def palindrome?
5
+ processed_content == processed_content.reverse
6
+ end
13
7
 
14
- private
8
+ private
15
9
  # Returns content for palindrome testing
16
10
  def processed_content
17
- self.scan(/[a-z]/i).join.downcase
11
+ self.to_s.scan(/[a-z\d]/i).join.downcase
18
12
  end
19
13
  end
14
+
15
+ class String
16
+ include NwoliverPalindrome
17
+ end
18
+ class Integer
19
+ include NwoliverPalindrome
20
+ end
@@ -1,3 +1,3 @@
1
1
  module NwoliverPalindrome
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: nwoliver_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
  - Nick Oliver