Module: EdgarPalindrome

Included in:
Integer, String
Defined in:
lib/edgar_palindrome.rb,
lib/edgar_palindrome/version.rb

Constant Summary collapse

VERSION =
"0.2.0"

Instance Method Summary collapse

Instance Method Details

#lettersObject



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