Sha256: 1068bb6dc419426589829741948f758049da95f20a58f7a108b3a44d34ba7201

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

# frozen_string_literal: true

require_relative "test_palindrome_gem/version"


module TestPalindromeGem
  def palindrome?
    processed_content == processed_content.reverse
  end

  def letters
    self.to_s.scan(/[a-z\d]/i).join
  end

  private 
  
  def processed_content
    self.letters.downcase
  end
end

class String 
  include TestPalindromeGem
end

class Integer
  include TestPalindromeGem
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
test_palindrome_gem-0.2 lib/test_palindrome_gem.rb