class String
Public Instance Methods
escape_double_quotes!()
click to toggle source
# File lib/movie_organizer/string.rb, line 18 def escape_double_quotes! gsub!(/["]/, '\\\\\"') end
escape_single_quotes!()
click to toggle source
# File lib/movie_organizer/string.rb, line 14 def escape_single_quotes! gsub!(/[']/, '\\\\\'') end
here_with_pipe(delimeter = ' ')
click to toggle source
html = <<-stop.here_with_pipe(delimeter=ānā)
|<!-- Begin: comment --> |<script type="text/javascript">
stop
# 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