Module: Bl1ndyPalindrome

Included in:
Integer, String
Defined in:
lib/bl1ndy_palindrome.rb,
lib/bl1ndy_palindrome/version.rb

Constant Summary collapse

VERSION =
'0.3.0'

Instance Method Summary collapse

Instance Method Details

#palindrome?Boolean

Returns true for a palindrome, false otherwise.

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/bl1ndy_palindrome.rb', line 7

def palindrome?
  return false if processed_content.empty?

  processed_content == processed_content.reverse
end