blazingwind_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: '08005e144ebdaac6c85a2b94632a7d1f3bf724d7e805f9724e003edbbe045e01'
4
- data.tar.gz: 7aa4b9efe6a371b2b6d57b166a48b165a0ce34b57ac66396e281ff9682c614ea
3
+ metadata.gz: c70de14b8fb578858b93b465ff77e06ff0a467809049cdab1818b2797cf987d8
4
+ data.tar.gz: 2d38168c19461405e8178b12e3741c735bd3dfdb8b5fc310539c2bbd6d2b81b6
5
5
  SHA512:
6
- metadata.gz: d73b2074b43785dd8d9d1788bc519843ab9c41a29c08527b3affd34297ccb886b5e88d1b1d0b63925b5c0c989686ffcfbf344a312fb9a73c28f1f40eeee54190
7
- data.tar.gz: f928c48ce595651b675457c19e460d48df2580ffb00148cd78474d89d1ba34c8522aab1cd40e10083e01630295b5b70e122ff45ca8a58c6da5c7079c0f0b6769
6
+ metadata.gz: 3a863dd83ff9b98a16827a36fb320a97444e1aa1034ee022526c7838efbd09a1a01675552c8669a78f13a533c09561565e0adda69c160e859cccc5bd992ce44a
7
+ data.tar.gz: a9d88dbb7a6ea12a4c952e7f7537c40ee7cc3b5585611326bf6c3366900c0ac0dde48523af06de16247e636fa15d5892ddfed4ea81585a55a2ec5f6be0226f72
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlazingwindPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -2,9 +2,8 @@
2
2
 
3
3
  require_relative "blazingwind_palindrome/version"
4
4
 
5
- class String
6
-
7
- # Returns trye for a palidrome, false otherwise.
5
+ module BlazingwindPalindrome
6
+ # Returns true for a palidrome, false otherwise.
8
7
  def palindrome?
9
8
  processed_content == processed_content.reverse
10
9
  end
@@ -29,6 +28,15 @@ class String
29
28
  private
30
29
 
31
30
  def processed_content
32
- self.scan(/[a-zA-Z]*/).join.downcase
31
+ self.to_s.scan(/[a-z\d]/i).join.downcase
33
32
  end
34
33
  end
34
+
35
+
36
+ class String
37
+ include BlazingwindPalindrome
38
+ end
39
+
40
+ class Integer
41
+ include BlazingwindPalindrome
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blazingwind_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
  - Sylwia Budzynska