duvall_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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99250866acad6a27553c6a1d0f3f62720a3a253671bdfdbca116d54afad46ebf
4
- data.tar.gz: 5b1d3ca8b50f5a796ef591aa7d03001d63f6359447efd6724ab6825e6259e1c9
3
+ metadata.gz: c9e64b5253b1d43b87073124dba0b9f6b5b3b6e6e376b2ac4a7aa1d01ff6748b
4
+ data.tar.gz: f8dab78633ae618c0aadc3220c15f9aea51f15e89ae20906a17afd111f3600d6
5
5
  SHA512:
6
- metadata.gz: 7e5177327fdd61b8162f71591ae9bc8f3179ec220afcc4664eeacd07afd96bafd8ff8652c8c7e3edcd3761fa4056fd4da04866e321a3b9d3f5c5e77d6ea38438
7
- data.tar.gz: f31d3b246824487b302ad758c6d7915f98af0486bf7abedc9dcb23fb74cefc84565779bfeb4197d56cadcf2dff4a0b2688e63475c4720ff7a4988f5197469a94
6
+ metadata.gz: 232484ea375732ab5c3baabb5155fc62fb85ce98edea446858a1f6fc27449272220d84db691011adc99f777cdad8d74a3892b2e16d57011fb6a84b337ab72a50
7
+ data.tar.gz: 56e2d6555231482d0ce6ed55e86177b1ac6bd01638caede0fc9d8175f497b2d39b7af9db6f8e575359ba552a1efe06c42b7d0e8fb853f82dac79faf46203d473
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- duvall_palindrome (0.1.0)
4
+ duvall_palindrome (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,6 +15,16 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ # if spec.respond_to?(:metadata)
19
+ # spec.metadata["allowed_push_host"] = "https://rubygems.org/"
20
+ #
21
+ # spec.metadata["homepage_uri"] = spec.homepage
22
+ # spec.metadata["source_code_uri"] = "https://github.com/Patrick-Duvall/duvall_palindrome"
23
+ # spec.metadata["changelog_uri"] = "https://github.com/Patrick-Duvall/duvall_palindrome"
24
+ # else
25
+ # raise "RubyGems 2.0 or newer is required to protect against " \
26
+ # "public gem pushes."
27
+ # end
18
28
 
19
29
  # Specify which files should be added to the gem when it is released.
20
30
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -1,3 +1,3 @@
1
1
  module DuvallPalindrome
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "duvall_palindrome/version"
2
2
 
3
- class String
3
+ module DuvallPalindrome
4
4
 
5
5
  # Returns true for a palindrome, false otherwise.
6
6
  def palindrome?
@@ -11,6 +11,13 @@ require "duvall_palindrome/version"
11
11
 
12
12
  # Returns content for palindrome testing.
13
13
  def processed_content
14
- self.scan(/[a-z]/i).join.downcase
14
+ self.to_s.scan(/[a-z0-9]/i).join.downcase
15
15
  end
16
16
  end
17
+
18
+ class String
19
+ include DuvallPalindrome
20
+ end
21
+ class Integer
22
+ include DuvallPalindrome
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duvall_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
  - Patrick Duvall