Sha256: 5e874251881ca423e47efdc41715a0aa2235156db6f54f21facf81281ec3772b
Contents?: true
Size: 439 Bytes
Versions: 2
Compression:
Stored size: 439 Bytes
Contents
# frozen_string_literal: true class String # html = <<-stop.here_with_pipe(delimeter="\n") # |<!-- Begin: comment --> # |<script type="text/javascript"> # stop def here_with_pipe(delimeter = ' ') lines = split("\n") lines.map! { |c| c.sub!(/\s*\|/, '') } lines.join(delimeter) end def escape_single_quotes! gsub!(/[']/, '\\\\\'') end def escape_double_quotes! gsub!(/["]/, '\\\\\"') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
movie_organizer-1.0.2 | lib/movie_organizer/string.rb |
movie_organizer-1.0.1 | lib/movie_organizer/string.rb |