Module: Slideshow::DebugFilter
- Included in:
- Gen
- Defined in:
- lib/slideshow/filters/debug_filter.rb
Instance Method Summary collapse
-
#dump_content_to_file_debug_html(content) ⇒ Object
use it to dump content before html post processing.
-
#dump_content_to_file_debug_text(content) ⇒ Object
use it to dump content before text-to-html conversion.
-
#dump_content_to_file_debug_text_erb(content) ⇒ Object
use it to dump content before erb merge.
Instance Method Details
#dump_content_to_file_debug_html(content) ⇒ Object
use it to dump content before html post processing
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/slideshow/filters/debug_filter.rb', line 24 def dump_content_to_file_debug_html( content ) return content unless logger.level == Logger::DEBUG outname = "#{@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) ⇒ Object
use it to dump content before text-to-html conversion
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/slideshow/filters/debug_filter.rb', line 41 def dump_content_to_file_debug_text( content ) return content unless logger.level == Logger::DEBUG outname = "#{@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) ⇒ Object
use it to dump content before erb merge
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/slideshow/filters/debug_filter.rb', line 7 def dump_content_to_file_debug_text_erb( content ) return content unless logger.level == Logger::DEBUG outname = "#{@name}.debug.text.erb" puts " Dumping content before erb merge to #{outname}..." File.open( outname, 'w' ) do |f| f.write( content ) end content end |