Sha256: 88e6970d0d0bbfd92cbb676be8a8ac50bad30ebd75312fb6bb772d6dd0dc6c64
Contents?: true
Size: 379 Bytes
Versions: 2
Compression:
Stored size: 379 Bytes
Contents
module FoulBall def self.fair?(text="") return true if text.nil? || text.empty? down_text = text.downcase configuration.banned_words.none? { |w| down_text.include?(w.downcase) } end def self.foul(text) return [] if text.nil? || text.empty? down_text = text.downcase configuration.banned_words.select { |w| down_text.include?(w.downcase) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foul_ball-0.1.4 | lib/foul_ball/umpire.rb |
foul_ball-0.1.3 | lib/foul_ball/umpire.rb |