bugeater_palindrome 0.1.0 → 0.2.1

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: c5ca7e85030f9a4797d5f32160b4c349a2cf34d6acf5cada7bd38d65ba4e3eb5
4
- data.tar.gz: dd0675c2528a6f4dd5dd9f350bda04aacae3b3cae0aad4c0750b36f9fba3728a
3
+ metadata.gz: f4c5bd70c8066361fe2b620d9f5bf33426016e13f1213e56c4bb79e7fbc0ed2f
4
+ data.tar.gz: b025eb56abbbf1f82bddd0e15daef41dd17f9efe89981b83fa73148a6a3756c4
5
5
  SHA512:
6
- metadata.gz: 20c4ce0b7848c25680a413fbda61b0f515d33d633dcd109eee2f57374793af4ee04e69c4abc063cb55095d00b2963c042b2512f63a9e927aeabf4b51916773f7
7
- data.tar.gz: 5e020c6403dd473f9f7690a74abd108d4eb6893c35325a6e362557ae11abdf19f6ebea5e2c5b0bff6cc40636b569575e258165c2904207b8381be343c3ed924b
6
+ metadata.gz: f15aff7e1c5498929e12bd5542bfaa70afefa3235c1d1e9270cf99b56d38639ce2e4ff2cdf665da8e307232d92b97b772a5c6191d25be9f48005e2a228d6adf3
7
+ data.tar.gz: aefd6947f9b6a0d1372d2f108aeaf0f2358d89825cb5885f0d1c89a0515dad8dd99a5734901d737ab7a8d989d923776f9827a41ac88af34419a181ba55d8755a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bugeater_palindrome (0.1.0)
4
+ bugeater_palindrome (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,22 +2,26 @@
2
2
 
3
3
  require_relative "bugeater_palindrome/version"
4
4
 
5
- class String
5
+ module BugeaterPalindrome
6
6
 
7
7
  # Returns true for a palindrome, false otherwise.
8
8
  def palindrome?
9
9
  processed_content == processed_content.reverse
10
10
  end
11
11
 
12
- def letters
13
- self.scan(/[a-z]/i).join
14
- end
15
-
16
12
  private
17
13
 
18
14
  # Returns content for palindrome testing.
19
15
  def processed_content
20
- self.letters.downcase
16
+ self.to_s.scan(/\w/).join.downcase
21
17
  end
22
18
 
19
+ end
20
+
21
+ class String
22
+ include BugeaterPalindrome
23
+ end
24
+
25
+ class Integer
26
+ include BugeaterPalindrome
23
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BugeaterPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugeater_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Steele