albopunkaldi_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: 5d0f06df2f3b3e3cc58ee6c7621f3dff901aad7bd83888560e01c7db4703fa54
4
- data.tar.gz: e5253cfee3dcf48d319bf27db3c80abe4da66ae1ca5ecc224dde5ac65e572536
3
+ metadata.gz: a8c241a406f59277013c62c80f6575a48dec103641f858e2ef1aaeb9ddb962b4
4
+ data.tar.gz: 6c7ae976406f96a2befe52bc27b206a56a67ce2fd4c507e6560101d1eb8e0927
5
5
  SHA512:
6
- metadata.gz: 588704fbb75250d459e8e187033edbcff5fa055ee0bf2e3ff4aa75b20f74af5a7ce9dde6c13214e18c39c6d037ef6b42be8c7dc1cfe5cf944852c89dfb21d976
7
- data.tar.gz: b649ec4bcd02e9db5ff8c7ba8163356bcc3bb5b83468ea078d7e7c1eabd4fbcf14c99e1816f99c519a326f8c453e5368e0ede8cbe9500b59e8b4af37f3679f30
6
+ metadata.gz: 9f6d71658b596d8bc3abeed24320449707fe2bd3f8371cfe8a32b21055a4bc471e665dbbfbdc91714bbe679a44ee880975ca2a1bb19eed555cdec3d4ae49e741
7
+ data.tar.gz: b5ec84133b9b8276734ce3057b6b38e92d0c64dbc40503d47a83e887bec261fabaccfb80e6dd2f13f200a3e5e7872ba09e43a0f4e09e9a68aa91a308e07922ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- albopunkaldi_palindrome (0.1.0)
4
+ albopunkaldi_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  `albopunkaldi_palindrome` is a sample Ruby gem created in [*Learn Enough Ruby to Be Dangerous*](https://www.learnenough.com/ruby-tutorial) by Alberto Pancaldi.
4
4
 
5
- The purpose of this gem is to detect if a text is whether or not a palindrome.
5
+ The purpose of this gem is to detect if strings or integer are palindrome or not.
6
6
 
7
7
  ## Installation
8
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AlbopunkaldiPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "albopunkaldi_palindrome/version"
4
4
 
5
- class String
5
+ module AlboPunkaldiPalindrome
6
6
 
7
7
  # Returns true for a palindrome, false otherwise.
8
8
  def palindrome?
@@ -13,6 +13,14 @@ class String
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-z\d]/i).join.downcase
17
17
  end
18
18
  end
19
+
20
+ class String
21
+ include AlboPunkaldiPalindrome
22
+ end
23
+
24
+ class Integer
25
+ include AlboPunkaldiPalindrome
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: albopunkaldi_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
  - Alberto Pancaldi