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