Sha256: a59947a31d35f5bc00b6c4e001c2e88cf95a2129cf9ea9e00660c33c526c4c57
Contents?: true
Size: 317 Bytes
Versions: 1
Compression:
Stored size: 317 Bytes
Contents
require "romenigld_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 |
---|---|
romenigld_palindrome-0.1.0 | lib/romenigld_palindrome.rb |