unvee7_palindrome 0.1.1 → 0.1.2

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: cedd221cfbcb9d461ef89874a9670a48baba1a051203c894297a3a59fb14358a
4
- data.tar.gz: da6ed7e2fc0e8828a07eebb113008cc22bb3235bd1447e511c4355b0b62096db
3
+ metadata.gz: a76a3ab4a2b494bb40e1cbf57a7ff669ed0893c81d95a7cc37ef65e7bcfb0a06
4
+ data.tar.gz: 2241b758a3b92f0732590127431a0caa5ebbb56a07b0b34691551f09a48480d5
5
5
  SHA512:
6
- metadata.gz: dc6850eaef3388c3d4bc12aae8d6ee6e2572bb6f624b8ae4087512e189f19a0a3ba1f6cc13a258ee8bdbe3d9070f1c81c550417657add69f007d500f8e15c3df
7
- data.tar.gz: 2ec54d5c184cd93f58bff34e726c4f3f970c377ac5de1583570f51a7869b7329935d6422328e3973562cd8cc9481677ab5dea38da19782a792f7fe93cdb2d606
6
+ metadata.gz: 8bcfa4f4d7a7d692af2c3bfd9a9e0d98e90d2d5d76f84f9684383734c029ff5a3a47d00bdd7ca2796d7d466bb04c5f3fddf18df411b9dba073d2390311f2578b
7
+ data.tar.gz: 8a1e3bbbcf496368eb7256c1c4ba13a4d67bec93ef5d7ba43597a4cb20c43a65a723aff01406364cdd9ce0261a81660067851c4d3968112fe3b106cbe1d66d9f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unvee7_palindrome (0.1.0)
4
+ unvee7_palindrome (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module Unvee7Palindrome
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -3,20 +3,25 @@ require "unvee7_palindrome/version"
3
3
  module Unvee7Palindrome
4
4
  class Error < StandardError; end
5
5
  # Your code goes here...
6
- end
7
6
 
8
- class String
7
+ # Returns true for a palindrome, false otherwise.
8
+ def palindrome?
9
+ processed_content == processed_content.reverse
10
+ end
9
11
 
10
- # Returns true for a palindrome, false otherwise.
11
- def palindrome?
12
- processed_content == processed_content.reverse
12
+ private
13
+ # Returns content for palindrome testing.
14
+ def processed_content
15
+ to_s.scan(/[^A-Za-z0-9]/i).join.downcase
13
16
  end
17
+ end
18
+ end
14
19
 
15
- private
20
+ class String
21
+ include Unvee7Palindrome
22
+ end
16
23
 
17
- # Returns content for palindrome testing.
18
- def processed_content
19
- item.to_str.gsub(/[^A-Za-z0-9]/i, "").downcase
20
- end
21
- end
24
+ class Integer
25
+ include String
26
+ end
22
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unvee7_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - unvee7