Class: Checkword
- Inherits:
-
Object
- Object
- Checkword
- Defined in:
- lib/check.rb
Class Method Summary collapse
Class Method Details
.runcheck(input) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/check.rb', line 3 def self.runcheck(input) # return input.split.map(&:capitalize).join(' ') # converting to lower case input=input.downcase # replacing bad words h=input.gsub("fuck", "f**k") h=h.gsub("ass", "a**") h=h.gsub("bitch", "b**ch") # capitalizing first alphabet of every word return h.split.map(&:capitalize).join(' ') end |