peony_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
  SHA256:
3
- metadata.gz: 17ca66801c32cff1e25511e1c15dbb3e2748effabd65b6e945e76999acc19781
4
- data.tar.gz: 8963c454b74e2eb8d1141cdf7a2b0247697103a54f2920bc5d98a1cb54f9f15e
3
+ metadata.gz: cc49c1614973ccc20535d3dccb4ad290f398a42fac6e527c731e6f169431114f
4
+ data.tar.gz: 2fe426170931cf4d15d53c288c1972f97c81f2bf19fcf28b38d22a727ace444c
5
5
  SHA512:
6
- metadata.gz: 1a4c96b5600115866b7fe7901f474af3eb8211452d5669b48d54e05633be1388c68dd417e971432f3e25b69a8106dcf44b5b7d6591f2a01b1b93ba426802a067
7
- data.tar.gz: 331f5611b3d8f3d4adf63930399ce799e16c1eebf47e2f08327de6c5a3f036088e57de524bd4074377d16faf37ea427640f656e016a6298a617056846be0de81
6
+ metadata.gz: d252885f3da4d7d5f65d66db77330c0b7997f423d84ec8c1a392a5f100561d3e7d356b23238b3016ac41b2f2817b2303fe58b9f53a270509ca0a6ef2dff67342
7
+ data.tar.gz: e36986e788e13c474e8badb200cd636f9d9cb0b61c601036f0d1fe16e125b4d73671c2a24e48bac72a473545d07a4a799177cf1d0b197ff85a8fabbab6682b4e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peony_palindrome (0.1.0)
4
+ peony_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -5,7 +5,7 @@ require "peony_palindrome/version"
5
5
  # Your code goes here...
6
6
  #end
7
7
 
8
- class String
8
+ module PeonyPalindrome
9
9
 
10
10
  # Returns true for a palindrome, false otherwise.
11
11
  def palindrome?
@@ -16,6 +16,18 @@ class String
16
16
 
17
17
  # Returns content for palindrome testing.
18
18
  def processed_content
19
- self.scan(/[a-z]/i).join.downcase
19
+ if self.is_a? String
20
+ self.scan(/[a-z]/i).join.downcase
21
+ elsif self.is_a? Integer
22
+ self.to_s
23
+ end
20
24
  end
21
25
  end
26
+
27
+ class String
28
+ include PeonyPalindrome
29
+ end
30
+
31
+ class Integer
32
+ include PeonyPalindrome
33
+ end
@@ -1,3 +1,3 @@
1
1
  module PeonyPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peony_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
  - Anna