Sha256: 136192dc65c058e7bda04b9bc7c86ab54284b4a77b0b149715c515545a504729
Contents?: true
Size: 354 Bytes
Versions: 1
Compression:
Stored size: 354 Bytes
Contents
# frozen_string_literal: true require_relative "dgamboa_palindrome/version" class String # Returns true for a palindrome, false otherwise. def palindrome? processed_content == processed_content.reverse end private # Returns content for palindrome testing. def processed_content self.scan(/[a-z]/i).join.downcase end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dgamboa_palindrome-0.1.0 | lib/dgamboa_palindrome.rb |