Sha256: 435a50fa77727051ef1b90f82b26e98993810e46c1824b3cb7b03deb119d6bcb
Contents?: true
Size: 368 Bytes
Versions: 1
Compression:
Stored size: 368 Bytes
Contents
# frozen_string_literal: true require_relative "alanriverogorinstein_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 |
---|---|
alanriverogorinstein_palindrome-0.1.0 | lib/alanriverogorinstein_palindrome.rb |