Sha256: eeccb3f9c93e636bb1c11be28901dba65239453efd2158dc6c4dc94a19f78aad

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

require "rstock_palindrome/version"

# test code below
class String

  # Returns true for a palindrome
  def palindrome?
    processed_content == processed_content.reverse
  end
  
  private

    # Returns content for palindrom testing.
    def processed_content
      scan(/[a-z]/i).join.downcase
    end
end  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rstock_palindrome-0.1.0 lib/rstock_palindrome.rb