Module: WfreyPalindrome

Included in:
Integer, String
Defined in:
lib/wfrey_palindrome.rb,
lib/wfrey_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
12
# File 'lib/wfrey_palindrome.rb', line 7

def palindrome?
  unless processed_content.empty?
    return processed_content == processed_content.reverse
  end
    return false
end