Module: OzemmouriPalindrome

Included in:
Integer, String
Defined in:
lib/ozemmouri_palindrome.rb,
lib/ozemmouri_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
13
# File 'lib/ozemmouri_palindrome.rb', line 7

def palindrome?
  if (processed_content == "" || processed_content == /\s+/)
    false
  else 
    processed_content == processed_content.reverse
  end
end