snoseeds_palindrome 0.1.0 → 0.2.1

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: 4caafeb5e3ca4bdfb1ec94f37d06a6fb1e9ac2dbc7a4387b177749ef647bb955
4
- data.tar.gz: 1fed81cd8d87e0f962b8b1f5691105d1f0540053ecc659067d090a9afcef1def
3
+ metadata.gz: 9acfaa6447e01bd463bb00c7e7b905878b6aeab71f6d1ce16ae44653373b8e79
4
+ data.tar.gz: 70d87a6726fcc9a2428301a7c9fb760f69649edc463eb1af205494953df3bd85
5
5
  SHA512:
6
- metadata.gz: 8170361514c541cba0f3c7ef438301c457793cc6cb61c1028575f864f1cfcd45fa3f446cb14de9a3400f86ded6c99e890981b23528a4210c034fdb48e2d6ed48
7
- data.tar.gz: a5f307cf350f97a9d6d22386fd556e00390f87430659aba07a22e21d9ca727b378a28a48a07586d0bbc3f3aae2e6fede03ad52080f3daf160de374982f754dba
6
+ metadata.gz: 3683f34c81c25496459b6699e8241cda0804240d9478f8815510089aba60e5e161e40ea7ba2980453ce72ab208a1f650dbcd599ab7e08b0e016093490d9cac7b
7
+ data.tar.gz: 07b7b292488e49d0157a40a4e2f29c42eba685269812f5e7cca1a50b38d3f25cc333b72ed6a54ba82fcb2f1e30371349fb67171d817dc2b3aefe9f7cbd6317a4
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnoseedsPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -2,22 +2,24 @@
2
2
 
3
3
  require_relative "snoseeds_palindrome/version"
4
4
 
5
- # module SnoseedsPalindrome
6
- # class Error < StandardError; end
7
- # # Your code goes here...
8
- # end
9
-
10
- class String
11
-
5
+ module SnoseedsPalindrome
12
6
  # Returns true for a palindrome, false otherwise.
13
7
  def palindrome?
14
- processed_content == processed_content.reverse
8
+ processed_content.length > 0 && processed_content == processed_content.reverse
15
9
  end
16
10
 
17
11
  private
18
12
 
19
13
  # Returns content for palindrome testing.
20
14
  def processed_content
21
- scan(/[a-z]/i).join.downcase
15
+ to_s.scan(/[a-z\d]/i).join.downcase
22
16
  end
23
17
  end
18
+
19
+ class String
20
+ include SnoseedsPalindrome
21
+ end
22
+
23
+ class Integer
24
+ include SnoseedsPalindrome
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snoseeds_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nurudeen Soremekun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-01-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby Palindrome Detector
14
14
  email: