hsztan_palindrome 0.1.01 → 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: efffe8a6ad0db3173538dc8c017ebb8ffa1c986a9f1e699794401ddda0379423
4
- data.tar.gz: 691bb9fd46adaf67af7725c4af1bed388d32509999659d886debeeae9fb5fe70
3
+ metadata.gz: 64ee1be11d919b7005f33b7a1a0ef105a45f31756160d7fbe29b6a5eedc9c28c
4
+ data.tar.gz: 42b9f5549c53712f9639559baa75643ee66942d85c9c44b2cb1b8b0da9092369
5
5
  SHA512:
6
- metadata.gz: ecfe4274d0d2ecae656af5ca445a25028785ec16c65752b3f2f6f9c7dd549e911170c7d561af6c4201ba1597a86ed79b2106db23f0f5dfaec00b455d3f8e33e3
7
- data.tar.gz: 74dae98fcea446e1e3103f3db140c370c09e6b17995c67f080d3aa7c160444801edc0ab4b7d1539370caafde58c6d6bc557d64ad944dee774f1320d4a64104a8
6
+ metadata.gz: b40f145cb5a12620fac613cd18fdb54bbfd0eeb8ac94ac11367359d77b6850bf46d6f8645a7ef6d62f8c03355a46980b6e311fd68eb5d9ae785a862ef15e1b4e
7
+ data.tar.gz: 14d0fdd633a6d8ccde775b52d3fd3f2958e8a7292a4604ff3b03955698652ba029ad78ae51382f77166ffeabaa68776c409fa6703b5e567640807df89585e653
@@ -1,3 +1,3 @@
1
1
  module HsztanPalindrome
2
- VERSION = "0.1.01"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "hsztan_palindrome/version"
2
2
 
3
- class String
3
+ module HsztanPalindrome
4
4
 
5
5
  def palindrome?
6
6
  processed_content == processed_content.reverse
@@ -9,6 +9,14 @@ class String
9
9
  private
10
10
 
11
11
  def processed_content
12
- self.scan(/[a-z]/i).join.downcase
12
+ self.to_s.scan(/[a-z\d]/i).join.downcase
13
13
  end
14
+ end
15
+
16
+ class String
17
+ include HsztanPalindrome
18
+ end
19
+
20
+ class Integer
21
+ include HsztanPalindrome
14
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hsztan_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.01
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Nawrocki