Class: String

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

Overview

Overwritting the class String

Instance Method Summary collapse

Instance Method Details

#palindrome?Boolean

Returns true for a palindrome, false otherwise.

Returns:

  • (Boolean)


7
8
9
# File 'lib/abneed_palindrome.rb', line 7

def palindrome?
  processed_content == processed_content.reverse
end