Class: Jupiter::Input
- Inherits:
-
Object
- Object
- Jupiter::Input
- Defined in:
- lib/jupiter/cli.rb
Instance Method Summary collapse
Instance Method Details
#clean_filename(filename) ⇒ Object
84 85 86 87 88 89 |
# File 'lib/jupiter/cli.rb', line 84 def clean_filename(filename) filename.gsub(/[^a-zA-Z 0-9\-_]/, "").gsub(/\s/,'-') # filename.gsub(/[^\w\s_-]+/, '') # filename.gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2') # filename.gsub(/\s+/, '_') end |