Class: StringUtils
- Inherits:
-
Object
- Object
- StringUtils
- Defined in:
- lib/viaggiatreno/string_utils.rb
Class Method Summary collapse
-
.remove_newlines_tabs_and_spaces(str) ⇒ Object
utility method.
Class Method Details
.remove_newlines_tabs_and_spaces(str) ⇒ Object
utility method
3 4 5 |
# File 'lib/viaggiatreno/string_utils.rb', line 3 def self.remove_newlines_tabs_and_spaces(str) str.content.delete("\r").delete("\n").tr("\t", ' ').gsub(/ +/, ' ').strip end |