vcarinhas_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: 580fb9fb41e2512f7e1f72c7c883c48efc3c6b10898d87185f263b4dde42cce8
4
- data.tar.gz: 007171fd58df6f9937c42f1b7d83fe573da03aa628618af7d6d02f997288ecf8
3
+ metadata.gz: 25f3dba2dd4a4143389c788d2c9c646b7e7d39eb2bddb6f12baf4fff16d06890
4
+ data.tar.gz: 48f6a736adec6ca161f9e6ea8d44556454718fc23e378ebdd5e7f81da0a8872c
5
5
  SHA512:
6
- metadata.gz: bcee04462c2f3e17293858b99cb17db03ecb1d3fb17aedd91e9ec86757f48341eedc33acc94086c9efb0673d65ba3af68a4a8f6482d5b9ab6c627a8db1b354d1
7
- data.tar.gz: f34438977bf30586d3fe8bea36d8c58ca31d51e59f1e0c1f219e1b0a9ce4f1a2acefd3e33e3b5c6510f302801b7b7f1c4f2cedb0a3e4d2fb361ca63674ccd4bf
6
+ metadata.gz: 5b253c3d5785376291aab109a476de5eddd77ba1dc7f94e75c94c4731f96191dcaf4604da943a88e028fc30d4ae824b17388ad627fd776173046bed0c22e112b
7
+ data.tar.gz: 0e750fd6c183952840ebfcadb0fc2862843dd93bcdc49d4f42b750cda3a81bbe3109c297d71d206b0ee66ede9a13c494a770f8129ce537f0fe3dd58b23d07c02
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VcarinhasPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "vcarinhas_palindrome/version"
4
4
 
5
- class String
5
+ module VCarinhasPalindrome
6
6
 
7
7
  # Returns true for a palindrome, false otherwise.
8
8
  def palindrome?
@@ -10,10 +10,18 @@ class String
10
10
  end
11
11
 
12
12
  private
13
-
13
+
14
14
  # Returns content for palindrome testing.
15
15
  def processed_content
16
- scan(/[a-z]/i).join.downcase
16
+ to_s.scan(/[a-zA-Z]*+\d*/i).join.downcase
17
17
  end
18
18
 
19
19
  end
20
+
21
+ class String
22
+ include VCarinhasPalindrome
23
+ end
24
+
25
+ class Integer
26
+ include VCarinhasPalindrome
27
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcarinhas_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
  - Vasco A. Carinhas