Module: Slideshow::StepHelper

Included in:
Gen
Defined in:
lib/slideshow/helpers/step_helper.rb

Instance Method Summary collapse

Instance Method Details

#step(opts = {}, &blk) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/slideshow/helpers/step_helper.rb', line 7

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='1'>\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