Module: EdgarPalindrome
Constant Summary collapse
- VERSION =
"0.2.0"
Instance Method Summary collapse
- #letters ⇒ Object
-
#palindrome? ⇒ Boolean
Returns true for a palindrome, false otherwise.
Instance Method Details
#letters ⇒ Object
10 11 12 |
# File 'lib/edgar_palindrome.rb', line 10 def letters self.scan(/[a-zA-Z\d]/).join end |
#palindrome? ⇒ Boolean
Returns true for a palindrome, false otherwise.
6 7 8 |
# File 'lib/edgar_palindrome.rb', line 6 def palindrome? processed_content == processed_content.reverse end |