Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/misc/misc.rb

Instance Method Summary collapse

Instance Method Details

#line_by_line_stripObject

Strip a string on a line-by-line basis.



17
18
19
20
21
22
23
# File 'lib/misc/misc.rb', line 17

def 
  lines = []
  self.each_line do |l|
    lines << l.strip
  end
  lines.join('')
end