Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bdibon_palindrome.rb

Instance Method Summary collapse

Instance Method Details

#lettersObject

a stub method is a method that does not work but at least exist



10
11
12
# File 'lib/bdibon_palindrome.rb', line 10

def letters
  scan(/\w+/).join
end

#palindrome?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/bdibon_palindrome.rb', line 5

def palindrome?
  processed_content == processed_content.reverse
end