Module: Tabcast::TextFilter

Defined in:
lib/tabcast.rb

Instance Method Summary collapse

Instance Method Details

#md5(input) ⇒ Object



13
14
15
# File 'lib/tabcast.rb', line 13

def md5(input)
	Digest::MD5.hexdigest(input)
end

#sha1(input) ⇒ Object



17
18
19
# File 'lib/tabcast.rb', line 17

def sha1(input)
	Digest::SHA1.hexdigest(input)
end

#spaces_to_underscores(input) ⇒ Object



5
6
7
# File 'lib/tabcast.rb', line 5

def spaces_to_underscores(input)
	input.gsub(/\s/, '_')
end

#urlencode(input) ⇒ Object



9
10
11
# File 'lib/tabcast.rb', line 9

def urlencode(input)
	CGI::escape(input)
end