Sha256: 720f5a0b39a70614065817673dc2806fa4783782268d951c74e9e55e433bd0a1

Contents?: true

Size: 597 Bytes

Versions: 41

Compression:

Stored size: 597 Bytes

Contents

module Slideshow
  module StepHelper

  
def step( opts={}, &blk )
     
  puts "  Adding HTML div block for step (incremental display)..."
    
  text = capture_erb(&blk)
      
  before  = "<!-- begin step #{opts.inspect} -->\n"
  before << "<div class='step' markdown='block'>\n"
  
  after   = "</div>\n"  
  after  << "<!-- end step -->\n"

  html  = ""
  html << guard_block( before )
  html << text
  html << guard_block( after )

  concat_erb( html, blk.binding )
  return
end
  
  
end # module StepHelper
end # module Slideshow

class Slideshow::Gen
  include Slideshow::StepHelper
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
slideshow-0.9.2 lib/slideshow/helpers/step_helper.rb