acp_palindrome 0.1.0 → 0.2.0

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: 78a71840456d5c9d0478a63d67825799cc831adccc8210fdafd394ae3d6a48c6
4
- data.tar.gz: 42c354cc6c2ef4fde89fa1148d13a98838660b71deba92b39813fb11889173b3
3
+ metadata.gz: 44d3348c8d7401be40c1f901389e280cba6cac0eefb9a7529cbf613680737318
4
+ data.tar.gz: 1dec79c8d45f7500564701138770a3d6d8c09cb55a2d01a756599694ff47f21c
5
5
  SHA512:
6
- metadata.gz: '0297cdf7768cb33684feda3cc6996d447e5f83cc7d28081c399b703d920d6400a094864b7aec4072c1d569582fd8d4aedbb8645ebd9f4411b086a3d27f11ab59'
7
- data.tar.gz: a6aaaab5481fa2e940eb5c48aa37216b60d8c19ff42c85d047e6896cfc7afaf9da54853eb645d770d11430f9259e92257dc9c7762b1bf1d407ec653317def367
6
+ metadata.gz: ecd9b627d1a7d95fe362e42d3c23e7d67d2580abf72a03bf33f109b6bd36058e70a57029cd9ccc678a3af779fbf4013129ac26bce60c093ff53b71e30455e84d
7
+ data.tar.gz: 57f1a6c18070f05f4d875e4ee0b0c7e6e76e7749b228a321b1243d11ec9cec3c3104e7ab995fd084a24b0e1235f59c07ad52a3b8c87ef239c27271ca0b17eb21
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acp_palindrome (0.1.0)
4
+ acp_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AcpPalindrome
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -2,8 +2,7 @@
2
2
 
3
3
  require_relative "acp_palindrome/version"
4
4
 
5
- class String
6
-
5
+ module AcpPalindrome
7
6
  # Returns true for a palindrome, false otherwise
8
7
  def palindrome?
9
8
  aux = processed_content
@@ -12,6 +11,14 @@ class String
12
11
 
13
12
  private
14
13
  def processed_content
15
- scan(/[a-z]/i).join.downcase
14
+ to_s.scan(/[a-z0-9]/i).join.downcase
16
15
  end
17
16
  end
17
+
18
+ class String
19
+ include AcpPalindrome
20
+ end
21
+
22
+ class Integer
23
+ include AcpPalindrome
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acp_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
  - Anderson Cáceres