Module: TheweepingwillPalindrome
- Defined in:
- lib/theweepingwill_palindrome.rb,
lib/theweepingwill_palindrome/version.rb
Constant Summary collapse
- VERSION =
"0.4.0"
Instance Method Summary collapse
-
#palindrome? ⇒ Boolean
Returns true if a string is a palindrome, else it returns false.
Instance Method Details
#palindrome? ⇒ Boolean
Returns true if a string is a palindrome, else it returns false
9 10 11 |
# File 'lib/theweepingwill_palindrome.rb', line 9 def palindrome? pc.empty? == false && pc == pc.reverse end |