Sha256: 2b5470a01eb6e30495ab8d38e43db7cb7d6b02653fba0e1f0f2ff39dd5ca37dc
Contents?: true
Size: 1.36 KB
Versions: 2
Compression:
Stored size: 1.36 KB
Contents
# encoding: utf-8 module Slideshow module DebugFilter # use it to dump content before erb merge def dump_content_to_file_debug_text_erb( content ) # NB: using attribs from mixed in class # - opts # - outdir return content unless opts.verbose? outname = "#{outdir}/#{@name}.debug.text.erb" puts " Dumping content before erb merge to #{outname}..." File.open( outname, 'w' ) do |f| f.write( content ) end content end # use it to dump content before html post processing def dump_content_to_file_debug_html( content ) # NB: using attribs from mixed in class # - opts # - outdir return content unless opts.verbose? outname = "#{outdir}/#{@name}.debug.html" puts " Dumping content before html post processing to #{outname}..." File.open( outname, 'w' ) do |f| f.write( content ) end content end # use it to dump content before text-to-html conversion def dump_content_to_file_debug_text( content ) # NB: using attribs from mixed in class # - opts # - outdir return content unless opts.verbose? outname = "#{outdir}/#{@name}.debug.text" puts " Dumping content before text-to-html conversion to #{outname}..." File.open( outname, 'w' ) do |f| f.write( content ) end content end end # module DebugFilter end # module Slideshow class Slideshow::Gen include Slideshow::DebugFilter end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slideshow-models-2.5.0 | lib/slideshow/filters/debug_filter.rb |
slideshow-models-2.4.0 | lib/slideshow/filters/debug_filter.rb |