ced_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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/ced_palindrome/version.rb +1 -1
- data/lib/ced_palindrome.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb8b2efc59f2eefb2688790ca938aafaf0da992188ddd6c842f9ada74e2a4bb8
|
4
|
+
data.tar.gz: f7a4108fdddd49cfca83a7ee2c4f9289b4bb3a4b5032a5db25642883846e301c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575d8d6d5487b9e611181f3e0a035a50d6ee7bf8c7584d0af6506f67c4a2f03e0e32f4e9e613744a192a29d74c164f74f0806d60fa1543196235c86cf22e732b
|
7
|
+
data.tar.gz: 4732689bf1b525a8c45795da5c676d8fd9a17dcbbe53faf3e9b6c23795ecd682327958dedba398a5df62c75e71361d5fd3f20370cce9862aa0bd4d4c4edb0b98
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -24,7 +24,7 @@ $ gem install ced_palindrome
|
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
|
-
`
|
27
|
+
`ced_palindrome` adds a `palindrome?` method to the `String` class, and can be used as follows:
|
28
28
|
|
29
29
|
```
|
30
30
|
$ irb
|
@@ -42,4 +42,4 @@ $ irb
|
|
42
42
|
|
43
43
|
## License
|
44
44
|
|
45
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
45
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/ced_palindrome.rb
CHANGED
@@ -6,7 +6,11 @@ class String
|
|
6
6
|
|
7
7
|
# Returns true for a palindrome, false otherwise.
|
8
8
|
def palindrome?
|
9
|
-
|
9
|
+
if processed_content.empty?
|
10
|
+
false
|
11
|
+
else
|
12
|
+
processed_content == processed_content.reverse
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
# Returns the letters in the string.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ced_palindrome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ced-01
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Lear Enough Ruby Palindrome detctor
|
14
14
|
email:
|