Class: String

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

Instance Method Summary collapse

Instance Method Details

#here_with_pipe(delimeter = ' ') ⇒ Object

html = <<-stop.here_with_pipe(delimeter=“n”)

|<!-- Begin: comment  -->
|<script type="text/javascript">

stop



8
9
10
11
12
# File 'lib/movie_organizer/string.rb', line 8

def here_with_pipe(delimeter = ' ')
  lines = split("\n")
  lines.map! { |c| c.sub!(/\s*\|/, '') }
  lines.join(delimeter)
end