Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/mhartl_palindrome.rb

Instance Method Summary collapse

Instance Method Details

#palindrome?Boolean

Returns true for a palindrome, false otherwise.

Returns:

  • (Boolean)


6
7
8
9
10
11
12
# File 'lib/mhartl_palindrome.rb', line 6

def palindrome?
  if processed_content.empty?
    false
  else
    processed_content == processed_content.reverse
  end
end