Module: Palindrome
Instance Method Summary collapse
Instance Method Details
#letters ⇒ Object
10 11 12 |
# File 'lib/dawidl022_palindrome.rb', line 10 def letters to_s.gsub(/[^\p{L}0-9]/, '') end |
#palindrome? ⇒ Boolean
6 7 8 |
# File 'lib/dawidl022_palindrome.rb', line 6 def palindrome? processed_content == processed_content.reverse end |