Sha256: 086d201d1cd67ac7bc4f6fe7e72215772120f8def07fc82c88963d3e661a575e
Contents?: true
Size: 312 Bytes
Versions: 1
Compression:
Stored size: 312 Bytes
Contents
require "bshelton_palindrome/version" class String # Returns true for a palindrome, false if otherwise. def palindrome? processed_content == processed_content.reverse end private # Returns content for palindrome testing. def processed_content self.scan(/[a-z]/i).join.downcase end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bshelton_palindrome-0.1.0 | lib/bshelton_palindrome.rb |