agustin_palindrome 0.2.0 → 0.3.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: f41921435da7f251ef4720950c9b60173c31d57228f6b7373729ce0b5f0db410
4
- data.tar.gz: e06943bf9bdc8a64d7bbd736c0cbe961b6607befbea827ebea97cf489c17d18a
3
+ metadata.gz: eff0bcb4b678ccb4df670b4130b695be5cc5a8a3cf5ca3ba235b8767d1276620
4
+ data.tar.gz: 072e65470d6a9abe19f9d6e9128b26baccd10cf30641d11bc4447d95e35536fe
5
5
  SHA512:
6
- metadata.gz: 6460653fdbea64bbdf6baa87c061ddaacc41c0dbb035ad197776f85982004afddde40f8c185e3653151d91283b7205f9fd68a720605e29eccef8e6e51ffdd36e
7
- data.tar.gz: 9e2c17233d2dd4815c70826c2f37acbd7c893f194733eeae789bcd0b242d59b955aa78c898aeba2adc6f9f61b5980a9026f323408a1052baf13351b15d47c8dd
6
+ metadata.gz: fab0fecd013faf532447b69c5ddff7bcd3560895a1b452b3f9d4b8f3fc546619555977dd00c285e0b199f763adea741ce33db85d95c07647ac19316dab5ef9e0
7
+ data.tar.gz: 36b8749287784d2bc26988564e8e1645fd944c577c7df863709e1eb47e1c4d54d5cceffb964c0d6e3af9c244cbf663f04fd228b45b48837350a9491bf771e221
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- agustin_palindrome (0.2.0)
4
+ agustin_palindrome (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -24,7 +24,7 @@ $ gem install agustin_palindrome
24
24
 
25
25
  ## Usage
26
26
 
27
- `agustin_palindrome` adds a `palindrome?` method to the `String` class, and can be used as follows:
27
+ `agustin_palindrome` adds a `palindrome?` method to the `String` and to the `Integer` class, and can be used as follows:
28
28
 
29
29
  ```
30
30
  $ irb
@@ -38,6 +38,10 @@ $ irb
38
38
  >> phrase = "Madam, I'm Adam."
39
39
  >> phrase.palindrome?
40
40
  => true
41
+ >> 12345.palindrome?
42
+ => false
43
+ >> 1234321.palindrome?
44
+ => true
41
45
  ```
42
46
 
43
47
  ## License
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AgustinPalindrome
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -4,6 +4,8 @@ require_relative "agustin_palindrome/version"
4
4
 
5
5
  module AgustinPalindrome
6
6
  def palindrome?
7
+ return false if processed_content.empty?
8
+
7
9
  processed_content == processed_content.reverse
8
10
  end
9
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agustin_palindrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AgustinPalmaM
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-14 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler