nymous_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: adc51df92f46817ac4630863744256c41e64503db5dd734fc2caf7e965af9058
4
- data.tar.gz: 9cd794d4234c4070d1d9b3a99a85736684bd97a39857d633c40e5f459132bf94
3
+ metadata.gz: 248eaeee4a2e385ab21b20c3fd240e5886fabbb54ab1edae77c7b85cde9caf3a
4
+ data.tar.gz: 812aace5f78099dc3105a7d0602e910b182cdeac2784377c27cc650326fa5ea2
5
5
  SHA512:
6
- metadata.gz: 9238f92ddbc3f32f516039eb31908765f0c56afc154feab75aff13ff30445ace6d8343ad48e9d5e92823dd8cb1921883fc6cedefbeb6bedeab5cdcad0e890052
7
- data.tar.gz: 9f125b8ea2cb7e50f2f150c492ae88f579c058c103c08fa2d9ab8669ee1e9563a64f8beb97f05fd6db51183b8273d97fd60ae9f059be2346703d38ad79281639
6
+ metadata.gz: bb2212fca0379a9ddd8db7534155824292c7e3b9966020d6438fdf89bb9cb91e463037dea0f4b9bb22026988e3226e38f123145bfc9d50cf69c635a8e25aee18
7
+ data.tar.gz: df92fd584a03c8b54c71b8d3a1f1a8387c1e599cbba20bcd6a5ccd00f22f202f6d348b9b95147d25116955b2a97795c3c6fd48416faf23ac43c6b39509d42ad3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nymous_palindrome (0.1.0)
4
+ nymous_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module NymousPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  require "nymous_palindrome/version"
2
2
 
3
- class String
4
-
3
+ module NymousPalindrome
5
4
  # Test if a String is a palindrome (ie it reads the same from left to right and from right to left)
6
5
  # @example
7
6
  # "not a palindrome".palindrome? #=> false
@@ -12,7 +11,16 @@ class String
12
11
  end
13
12
 
14
13
  private
14
+
15
15
  def processed_content
16
- self.scan(/[[:alpha:]]/i).join.downcase
16
+ self.to_s.scan(/[[:alnum:]]/i).join.downcase
17
17
  end
18
18
  end
19
+
20
+ class String
21
+ include NymousPalindrome
22
+ end
23
+
24
+ class Integer
25
+ include NymousPalindrome
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nymous_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
  - Thomas Gaudin