Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/workflow-to-galaxy.rb
Overview
Add methods to the String class to operate on file paths.
Instance Method Summary collapse
-
#to_filename ⇒ Object
:call-seq: str.to_filename -> string.
Instance Method Details
#to_filename ⇒ Object
:call-seq:
str.to_filename -> string
Returns a new String with spaces substituted by underscores and removes all special characters.
17 18 19 |
# File 'lib/workflow-to-galaxy.rb', line 17 def to_filename self.gsub(/ /, '_').gsub(/[^A-Za-z0-9_]/, '') end |