a89529294_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: 4b0c96c5b665897c91de76a0a01a007bbf5780b6ed3be6e8779cfc1945823c0a
4
- data.tar.gz: dd087865498e922a03b4c4788cc24819165ce9e5cd8506af9926ddada08d57b8
3
+ metadata.gz: 90804f7da42e087a58d7c1d2586bdfa0846b494c1652f447f39c16659d90edb3
4
+ data.tar.gz: 5ebb157d607e6052c39a2604fa26ddf292c71126c8ecf5224c303156c54cfc6b
5
5
  SHA512:
6
- metadata.gz: a0423f9d0e13a35f3a059ab34339cd95017b5b9d9a92999d87de9f3d0f715ddfc615500b185b3964e8b1e1acc77e7508dd361007e223239c068f4baec489c7fc
7
- data.tar.gz: 8298145e2afd12f9c333fa97ddbb9547722e49aa4505180d97ee7cc5e576853bbc68cfddd75dbf0fb8624e94f266cff8005426fa3c0a975cb8820e632e2f011a
6
+ metadata.gz: 4ba406d735b48a79ca286b8c94506c8e9f19ada4fb2a4d8bf420d45e7b6ae7e5e8bf8ce610be4d58ad73ea515f41422b22eeb2f5913b7d2fa40bf60ac1694a45
7
+ data.tar.gz: 0c2bf47aa7f263152b6062a01692ffee7371867da44320779409f1d302e8d00b1533ac27771b4dc9efa37e158a15d2e49136bfbe51e6ec2640efe42e7ab2722d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- a89529294_palindrome (0.1.0)
4
+ a89529294_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module A89529294Palindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -1,15 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "a89529294_palindrome/version"
4
-
5
- class String
4
+ module A89529294_palindrome
5
+ # Returns true for a palindrome, false otherwise.
6
6
  def palindrome?
7
7
  processed_content == processed_content.reverse
8
8
  end
9
9
 
10
10
  private
11
11
 
12
+ # Returns content for palindrome testing.
12
13
  def processed_content
13
- scan(/[a-z]/i).join.downcase
14
+ to_s.scan(/\w/).join.downcase
14
15
  end
15
16
  end
17
+
18
+ class String
19
+ include A89529294_palindrome
20
+ end
21
+
22
+ class Integer
23
+ include A89529294_palindrome
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a89529294_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
  - Albert Chang