johntheyoung_palindrome 0.1.0 → 0.1.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: 74f7c95b0b6a57d216e7f3248539849ca97b8907402a301794bac04482e711ba
4
- data.tar.gz: 1a3803b8d940b2dc54eaf896083794de047217cab9c49aff1f50d99ec5d1e3c4
3
+ metadata.gz: 6fab3c3417d6bb945967dd22cbc91118d1c826166084fa0f93cd76ac18ba0356
4
+ data.tar.gz: 7ca4524bd866e5274bdfae8f24f74408066304b6fe63d1d0ef5090d735d9d3b6
5
5
  SHA512:
6
- metadata.gz: bf5a6f22988ee60e82d340df98e104dacf7c43adc9cde26858868320d4e37614813437e3277f42800c25456a46845968c3bae2220a218f9bb4ad9415db81d6fc
7
- data.tar.gz: 41ee5a354f868019bbb6fdab848ef98c2dddeaf0ddfa6331287185b4cbcbbdb3998884497ec0cc657b268a368e8bfe757827a5f69230e490208fd75ba9fe6027
6
+ metadata.gz: a4b117d68f638abcee5cdf51aa569c19429d62ef5fbbc7624709891c29890651bb56c969727cbab3b1f91d3f12d45658ef1d58de5f571479e2e82387ffc7a6db
7
+ data.tar.gz: 763c442b6b935d5069c58e79c109938381a640de84900cb43183ce6139ce83c7a27c84b579e55d3f3eed8a94e91cbd03ae4d658e95e9f8ce7cfc64435842dbd6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- johntheyoung_palindrome (0.1.0)
4
+ johntheyoung_palindrome (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module JohntheyoungPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  require "johntheyoung_palindrome/version"
2
2
 
3
- class String
3
+
4
+ module Palindrome
4
5
 
5
6
  # Returns true for a palindrome, false otherwise.
6
7
  def palindrome?
@@ -11,6 +12,14 @@ class String
11
12
 
12
13
  # Returns content for palindrome testing.
13
14
  def processed_content
14
- scan(/[a-z]/i).join.downcase
15
+ self.to_s.scan(/[a-zA-Z]|\d/i).join.downcase
15
16
  end
16
17
  end
18
+
19
+ class String
20
+ include Palindrome
21
+ end
22
+
23
+ class Integer
24
+ include Palindrome
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johntheyoung_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Young
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-17 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby palindrome detector
14
14
  email: