Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/purify/string.rb

Instance Method Summary collapse

Instance Method Details

#purifyObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/purify/string.rb', line 2

def purify
	string_array = self.split(' ')
	string_array.map! do |element|
	  if Purify::show.include? element
	    Purify::asterisk(element.length)
	  else
	  	element
	  end
	end
	string_array.join(" ")
end