hughes_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: 02c15a002505f6aec4f7532fcc78a006f419c6e7f1e2447f5b2bd6574139a307
4
- data.tar.gz: 51d5fb91e6507f7766aefd28af2ded4aeb122c758de48eb6d575496f542d2eb0
3
+ metadata.gz: 31dbfe9904647e05075b03836ddea15542bb6dbb0ce6354985fb8f06a0b1e610
4
+ data.tar.gz: 6e2e1673ca237a2fd6e3b7ce11493c78c6f414584454dd1ad51fe013b8f4af5b
5
5
  SHA512:
6
- metadata.gz: b040d6f2ce5be4007c42c9ea3c3e2e7f5ca025bebebc69644d179fbc45bf5a4f5178632c4facc03d6cc7b6afdc78f73c27493d1a3f47bd2a697b5b018f5f13a5
7
- data.tar.gz: f292816fcaee2ebd3d6a7db436c1f4bac3e53931025bc35ac9a017917a0510be3c99761dcfeda0d922bc95f64259cf89af227ff60520e325d2b58f588bfcf121
6
+ metadata.gz: e6e1a342f818620d0461e6dd475935e50bbaf300f566aff74c8d76bc2577dd2a56c928d81623d2e191d2e7a5f7ac5473968a32b2841adc234657535abe0e618d
7
+ data.tar.gz: ef12ff9e7f1a4615465bb4e3ab82eb6a03b468ff817c4e17679873215926ef76005fae5aca514e9ca23991c75bc3a508a68dbf66320029c8575d91567ac338e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hughes_palindrome (0.1.0)
4
+ hughes_palindrome (0.2.0)
5
5
  bundler (~> 2.2.11)
6
6
 
7
7
  GEM
@@ -1,18 +1,22 @@
1
- # frozen_string_literal: true
2
-
3
1
  require_relative "hughes_palindrome/version"
4
2
 
5
- class String
3
+ module HughesPalindrome
6
4
 
7
5
  def palindrome?
8
6
  processed_content == processed_content.reverse
9
7
  end
10
8
 
11
-
12
-
13
9
  private
14
10
 
15
11
  def processed_content
16
- self.scan(/[a-z]/i).join.downcase
12
+ self.to_s.scan(/[a-z\d]/i).join.downcase
17
13
  end
18
14
  end
15
+
16
+ class String
17
+ include HughesPalindrome
18
+ end
19
+
20
+ class Integer
21
+ include HughesPalindrome
22
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HughesPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hughes_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
  - Mark Hughes