xiaosheng91_palindrome 0.2.0 → 0.2.1
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 +7 -8
- data/lib/xiaosheng91_palindrome/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95784a68d3312243445b40fa8820b8074fd74cccfd7e6f85c70e6b0dee4ff2c7
|
4
|
+
data.tar.gz: 73e5e1e8df9be7d1c4ec6a4ebc68c370031b0874370352fe23c46a692c73e6c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21f92f5ec2cfff63769a71a1b7f775c9c08bd86e48e5f81444fb25c5479973c040ee9ca368cb6f256c8807f64e6ec0eb04e557ac1c7f6d907f31eed9ce73201
|
7
|
+
data.tar.gz: 4e377472a0af7bed1a80cd39b335c6853b78b24d9b72051dfdf09da53febf9fc8a9a1d9cc7583980a87380bc8cda25640b12d208b3742010e4fd83f7d48b4096
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Palindrome detector
|
2
2
|
|
3
|
-
`
|
3
|
+
`xiaosheng91_palindrome` is a sample Ruby gem created in [*Learn Enough Ruby to Be Dangerous*](https://www.learnenough.com/ruby-tutorial) by Michael Hartl.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
To install `
|
7
|
+
To install `xiaosheng91_palindrome`, add this line to your application's `Gemfile`:
|
8
8
|
|
9
9
|
```
|
10
|
-
gem '
|
10
|
+
gem 'xiaosheng91_palindrome'
|
11
11
|
```
|
12
12
|
|
13
13
|
Then install as follows:
|
@@ -19,24 +19,23 @@ $ bundle install
|
|
19
19
|
Or install it directly using `gem`:
|
20
20
|
|
21
21
|
```
|
22
|
-
$ gem install
|
22
|
+
$ gem install xiaosheng91_palindrome
|
23
23
|
```
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
|
-
`
|
27
|
+
`xiaosheng91_palindrome` adds a `palindrome?` method to the `String` class and `Integer` class, and can be used as follows:
|
28
28
|
|
29
29
|
```
|
30
30
|
$ irb
|
31
|
-
>> require '
|
31
|
+
>> require 'xiaosheng91_palindrome'
|
32
32
|
>> "honey badger".palindrome?
|
33
33
|
=> false
|
34
34
|
>> "deified".palindrome?
|
35
35
|
=> true
|
36
36
|
>> "Able was I, ere I saw Elba.".palindrome?
|
37
37
|
=> true
|
38
|
-
>>
|
39
|
-
>> phrase.palindrome?
|
38
|
+
>> 12321.palindrome?
|
40
39
|
=> true
|
41
40
|
```
|
42
41
|
|