tweihe_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
  SHA1:
3
- metadata.gz: b8a7f6e5a5f30544c0511fa3d8bc3a664b443879
4
- data.tar.gz: 70c23559aa1fb1f81355feeea80812753b66402b
3
+ metadata.gz: d64f58e5eaec7f6953427953eb32ef397d97064e
4
+ data.tar.gz: 7dc30b8311cdc44565a9763e57e37d3a9336f6e0
5
5
  SHA512:
6
- metadata.gz: bb40ad42606da48116e41bcc5d2b651bc6d81a3c33ae5ce5985c0e2e037511667b22103ab283479e6ed0c8a5de471cb20dde34456ad650e18472359b1f6c9fee
7
- data.tar.gz: 134e076a4e1bc47d5fe0d1a7aef91b6410ecefd31814a5b4b3aba4532db19de1bcaf82976620a93951790976b650a99bbad11d2fff5873df89db304f314a82d8
6
+ metadata.gz: e113133aa04d9099f859908ad3a51d93557cdf71247642332d55d319226b3b7139ade84fa1f80d9e943425f26e6a00e42070b28e061f68a9d7df22d37177a834
7
+ data.tar.gz: a82d4a80916f4af9095d4c2d451c19a93be8f757963487d19b950b16f8cb7a6219fb8eaee1b3ed84b47cf746409fa2868336195224294ae428132d3a0333bbd0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tweihe_palindrome (0.1.0)
4
+ tweihe_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module TweihePalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,11 +1,6 @@
1
1
  require "tweihe_palindrome/version"
2
2
 
3
- # module TweihePalindrome
4
- # class Error < StandardError; end
5
- # # Your code goes here...
6
- # end
7
-
8
- class String
3
+ module TweihePalindrome
9
4
 
10
5
  # Returns true for a palindrome, false otherwise.
11
6
  def palindrome?
@@ -16,6 +11,18 @@ class String
16
11
 
17
12
  # Returns content for palindrome testing.
18
13
  def processed_content
19
- self.scan(/[a-z]/i).join.downcase
14
+ self.to_s.scan(/[a-z\d]/i).join.downcase
20
15
  end
21
16
  end
17
+
18
+ class String
19
+
20
+ include TweihePalindrome
21
+
22
+ end
23
+
24
+ class Integer
25
+
26
+ include TweihePalindrome
27
+
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweihe_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
  - tweihe