nelsonagamata_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: 16d99a70235c242c19f07bed91f16af23ee1683f3b1dd7e3c8e9a5cf742e3e84
4
- data.tar.gz: b4130e8b5507f00bbcbd8134172d261add786069f9abce5f50a5031c32f8601e
3
+ metadata.gz: 153176841b95bbbbaf845c43e6a84a922c35c785bd2185e05e46c338fcceb798
4
+ data.tar.gz: aa36456e8cb5c4ae39f61eab1c691bfd9072158611bd755bede78637a6654635
5
5
  SHA512:
6
- metadata.gz: 5225e07a11d4846bf5e67cf85242c13759bf616458a00fb7c65e95492235457ec2fe72d3f18c1d40110abd4a6084b91ccbb255da5453b848d35d85b3a4cc0200
7
- data.tar.gz: dc08ee286093b3cb6bdbea55c3c68f311f3cedfd8df40ef079f4d6b1c90a61124cd7364700d3e457d1c08f3c6472d7b715d9372a6cdf32f504c1b09decc92424
6
+ metadata.gz: c9153f4291791304b8a07c6de68416bc039957839507ab3275d1dc413dac8a81e3d3406bbc5d54a256105fcdd15b7db9b75b194dff21ed4b2c9da78ddaeac4fd
7
+ data.tar.gz: a18be551d44f34eecc3f55ce126404d1fc31b0a3f99eef268326875c51ae5add0031a10072ea67791ff64f1ff98b7438b8e4c7809927b5aeb41318544200e235
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nelsonagamata_palindrome (0.1.0)
4
+ nelsonagamata_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module NelsonagamataPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,16 +1,23 @@
1
1
  require "nelsonagamata_palindrome/version"
2
2
 
3
- class String
4
-
3
+ module NelsonagamataPalindrome
5
4
  #Returns true for palindrome, false otherwise
6
5
  def palindrome?
7
6
  processed_content == processed_content.reverse
8
7
  end
9
-
8
+
10
9
  private
11
10
 
12
11
  #Returns content for palindrome testing
13
12
  def processed_content
14
- self.scan(/[a-z]/i).join.downcase
13
+ self.to_s.scan(/[a-z\d]/i).join.downcase
15
14
  end
16
15
  end
16
+
17
+ class String
18
+ include NelsonagamataPalindrome
19
+ end
20
+
21
+ class Integer
22
+ include NelsonagamataPalindrome
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nelsonagamata_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
  - Nelson Agamata