Method: String#here_with_pipe
- Defined in:
- lib/midwire_common/string.rb
#here_with_pipe(delimeter = ' ') ⇒ Object
html = <<-stop.here_with_pipe(delimeter=“n”)
|<!-- Begin: comment -->
|<script type="text/javascript">
stop
50 51 52 53 54 55 |
# File 'lib/midwire_common/string.rb', line 50 def here_with_pipe(delimeter = ' ') lines = split("\n") lines.map! { |c| c.sub!(/\s*\|/, '') } new_string = lines.join(delimeter) replace(new_string) end |