Sha256: b20e4c2653af536634f916cd0d188b8162379efc1d4cb27bcb3f7fd99ea25b6c
Contents?: true
Size: 350 Bytes
Versions: 20
Compression:
Stored size: 350 Bytes
Contents
module Distil class JavascriptFile < SourceFile extension 'js' content_type 'js' def can_embed_as_content(file) [".css", ".html", ".json"].include?(file.extension) end def escape_embeded_content(content) content.gsub("\\", "\\\\").gsub("\n", "\\n").gsub("\"", "\\\"").gsub("'", "\\\\'") end end end
Version data entries
20 entries across 20 versions & 1 rubygems