sstacey_palindrome 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eb225e450b9e21f7dad572eadb7998c39118dc390e5002a4f5cc113fcc60bd6
4
- data.tar.gz: 044f69438c268ea20e78b3a819e802a5bdbc4d4e6d4e72bc8ce0eaabec3274c0
3
+ metadata.gz: ccfa18dd86f3e49cb2a5e2d4375d45fc94bdf85d690f01793e81dcdfe4eb3741
4
+ data.tar.gz: c32efa08baacbe4297a4f93d2fb9e1b016f8bab0e104f1d6c9fe469a3d2a303b
5
5
  SHA512:
6
- metadata.gz: 3ee67b2f390190351b793f08aa3559bcff7aacc4c229665998ddbf84c6053467e241574ea875da2c6b673fc1e94d8ef0389e56bf54261bfd59f82182ed5b6863
7
- data.tar.gz: 78853aba6b8027350b235850cd90c181d866fbc3565d6b6d1a80693abdcad708a1bafed98a9388d3c759ab801c521d14e9a58ad7711a009a4364e77b184926a9
6
+ metadata.gz: 254aaa1c4586a6e74f26946ccbdfd996a78784fc225f39ed8cb5cc1a4e67ce99ac4355a92b708690b8839fa71167a01e14b90337d9251e67135804eb0e5b26e9
7
+ data.tar.gz: 3e9d9c5da07946907de57d4c307c995477f0bea623491595d8111a7570c46663f8429f86ed936cc706b8a5f4c643566cf4301411ee814c8d40e04cd02db3a080
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SstaceyPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -2,14 +2,21 @@
2
2
 
3
3
  require_relative "sstacey_palindrome/version"
4
4
 
5
- class String
5
+ module SstaceyPalindrome
6
6
  def palindrome?
7
7
  processed_content == processed_content.reverse
8
8
  end
9
9
 
10
10
  private
11
11
  def processed_content
12
- self.scan(/[a-z]/i).join.downcase
12
+ self.to_s.scan(/[a-z0-9]/i).join.downcase
13
13
  end
14
-
14
+ end
15
+
16
+ class String
17
+ include SstaceyPalindrome
18
+ end
19
+
20
+ class Integer
21
+ include SstaceyPalindrome
15
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sstacey_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
  - sstacey