fchagasjr_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: 1a5be4fdd499d8f7ccc52450121583cfd97443216b8d0c864d28345351bf2277
4
- data.tar.gz: da50a96f0a64b15f1547085789b7d9b353899f93972544b21994c40bfb334c97
3
+ metadata.gz: a909bec1685cab04d8da62ba29ef7dc09ef90496d33c5fa3ff653a87f3d68942
4
+ data.tar.gz: dfb31a3cdf948baa8e74285e4edf874c65c3293f2807fc61b8c31335e84abd0a
5
5
  SHA512:
6
- metadata.gz: 5d985f62512048035c82e515efd8376c046cd1cd651304b5a8274d20795f795b2b7799ada3e03051d4c2b4fb54432afd7a55da891efc370c5aa1f44bc19c1190
7
- data.tar.gz: 8fdb897c74c2fe99472ab2789237bf102c10860426b1ac319f191c1b62648c566a0028ce3270b732360a8be0f88d16faf4613b433068b1ed6ca51afc7a1d9805
6
+ metadata.gz: db99902c7593a754c7dd280a805ec876516fa329ea0c90bc38e63a8d468943ef81e0c0e15c0b86ecb4c4dff1ed8bd466f39efc2be5b89dfe1f5a2a165623b24b
7
+ data.tar.gz: c319a1cda12d486942b3deefd16b4fbff9515acf870539adc024dac85457f1cbe4e4778556d4b7252ea57a19f84eab3da85df79ad7616227b6881a56aa4b9943
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FchagasjrPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -1,8 +1,6 @@
1
- # frozen_string_literal: true
2
-
3
1
  require_relative "fchagasjr_palindrome/version"
4
2
 
5
- class String
3
+ module FchagasjrPalindrome
6
4
  def palindrome?
7
5
  processed_content == processed_content.reverse
8
6
  end
@@ -10,6 +8,14 @@ class String
10
8
  private
11
9
 
12
10
  def processed_content
13
- scan(/[a-z0-9]/i).join.downcase
11
+ to_s.scan(/[a-z0-9]/i).join.downcase
14
12
  end
15
- end
13
+ end
14
+
15
+ class String
16
+ include FchagasjrPalindrome
17
+ end
18
+
19
+ class Integer
20
+ include FchagasjrPalindrome
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fchagasjr_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
  - Francisco das Chagas Silva Junior