Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/is_palindromic/overloads.rb
Overview
Overload the Integer class
Instance Method Summary collapse
Instance Method Details
#is_palindromic? ⇒ Boolean
5 6 7 8 9 |
# File 'lib/is_palindromic/overloads.rb', line 5 def is_palindromic? return false if processed_content.empty? processed_content == processed_content.reverse end |
#processed_content ⇒ Object
11 12 13 |
# File 'lib/is_palindromic/overloads.rb', line 11 def processed_content to_s.scan(/[[:alnum:]]/i).join.downcase end |