Sha256: f0c5343e01638068dc37402d1a474ada71e160028396f8c6baf5223e27a30626
Contents?: true
Size: 511 Bytes
Versions: 1
Compression:
Stored size: 511 Bytes
Contents
# frozen_string_literal: true require_relative "sekidome_palin/version" class String #returns true if palindrome, else false def palin? processed == processed.reverse # here processed will use the returned value from the method processed end # returns content for palin testing def processed self.downcase.gsub(/\W/, '') end end # module SekidomePalin # class Error < StandardError; end # # Your code goes here... # end # "A man, a plan, a canal".downcase.gsub(/[^a-zA-Z]/, '')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sekidome_palin-0.1.0 | lib/sekidome_palin.rb |