Sha256: fde0bff4690992520eb8a6684fdb038147ba364ef7fa98629a5d0579e66ad257
Contents?: true
Size: 321 Bytes
Versions: 1
Compression:
Stored size: 321 Bytes
Contents
require "rolandmueller_palindrome/version" class String # Returns true for a palindrome, false 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 |
---|---|
rolandmueller_palindrome-0.1.0 | lib/rolandmueller_palindrome.rb |