module Slideshow::DebugFilter

Public Instance Methods

dump_content_to_file_debug_html( content ) click to toggle source

use it to dump content before html post processing

# File lib/slideshow/filters/debug_filter.rb, line 29
def dump_content_to_file_debug_html( content )

  # NB: using attribs from mixed in class
  #   - opts
  #   - outdir

  return content   unless config.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
dump_content_to_file_debug_text( content ) click to toggle source

use it to dump content before text-to-html conversion

# File lib/slideshow/filters/debug_filter.rb, line 50
def dump_content_to_file_debug_text( content )

  # NB: using attribs from mixed in class
  #   - opts
  #   - outdir

  return content   unless config.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
dump_content_to_file_debug_text_erb( content ) click to toggle source

use it to dump content before erb merge

# File lib/slideshow/filters/debug_filter.rb, line 8
def dump_content_to_file_debug_text_erb( content )

  # NB: using attribs from mixed in class
  #   - opts
  #   - outdir

  return content   unless config.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