Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/misc/misc.rb
Instance Method Summary collapse
-
#line_by_line_strip ⇒ Object
Strip a string on a line-by-line basis.
Instance Method Details
#line_by_line_strip ⇒ Object
Strip a string on a line-by-line basis.
17 18 19 20 21 22 23 |
# File 'lib/misc/misc.rb', line 17 def line_by_line_strip lines = [] self.each_line do |l| lines << l.strip end lines.join('') end |