Sha256: f8cef85be2f2ab0d8943d1284dea5f2ae4c4f6c95e0384523ec65a22eb063f4a

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

require_relative "ephl_palindrome/version"

#   class Error < StandardError; end
#   # Your code goes here...
# end

module EphlPalindrome

  def palindrome?
    processed_content == processed_content.reverse
  end


  private

  def processed_content
    to_s.scan(/[a-z]/i).join.downcase
  end

end

class String
  include EphlPalindrome
end

class Integer
  include EphlPalindrome
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ephl_palindrome-0.2.0 lib/ephl_palindrome.rb