Module: TextFilter
- Defined in:
- lib/tabcast.rb
Instance Method Summary collapse
- #md5(input) ⇒ Object
- #sha1(input) ⇒ Object
- #spaces_to_underscores(input) ⇒ Object
- #urlencode(input) ⇒ Object
Instance Method Details
#md5(input) ⇒ Object
10 11 12 |
# File 'lib/tabcast.rb', line 10 def md5(input) Digest::MD5.hexdigest(input) end |
#sha1(input) ⇒ Object
14 15 16 |
# File 'lib/tabcast.rb', line 14 def sha1(input) Digest::SHA1.hexdigest(input) end |
#spaces_to_underscores(input) ⇒ Object
2 3 4 |
# File 'lib/tabcast.rb', line 2 def spaces_to_underscores(input) input.gsub(/\s/, '_') end |
#urlencode(input) ⇒ Object
6 7 8 |
# File 'lib/tabcast.rb', line 6 def urlencode(input) CGI::escape(input) end |