Sha256: 75206fade8e34259ed84ece33fb0b78364db63a20462afb716fcd3fd3cb70082

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

require 'kpietrzk_palindrome/version'
# Documentation comments
class String
  # Returns true for a palindrome, false otherwise.
  def palindrome?
    processed_content == processed_content.reverse
  end

  # Returns the letters in the string.
  def letters

  end

  private

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


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kpietrzk_palindrome-0.1.0 lib/kpietrzk_palindrome.rb