Class: String

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

Overview

module TrontzPalindrome

class Error < StandardError; end
# Your code goes here...

end

Instance Method Summary collapse

Instance Method Details

#palindrome?Boolean

Returns true for a palindrome, false otherwise

Returns:

  • (Boolean)


11
12
13
# File 'lib/trontz_palindrome.rb', line 11

def palindrome?
  processed_content == processed_content.reverse
end