Module: Rabbit::Parser::PauseSupport

Included in:
Markdown::Converter, RD::RD2RabbitVisitor, Wiki::RabbitOutput
Defined in:
lib/rabbit/parser/pause-support.rb

Instance Method Summary collapse

Instance Method Details

#burn_out_pause_targetsObject


18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/rabbit/parser/pause-support.rb', line 18

def burn_out_pause_targets
  @slides.each do |slide|
    (pause_targets[slide] || []).each do |target|
      slide.register_default_wait_proc(target.parent) do |*args|
        target.show do
          next_proc = args.pop
          next_proc.call(*args)
        end
      end
    end
  end
end

#pause_targetsObject


4
5
6
# File 'lib/rabbit/parser/pause-support.rb', line 4

def pause_targets
  @pause_targets ||= {}
end

#register_pause(target) ⇒ Object


8
9
10
11
# File 'lib/rabbit/parser/pause-support.rb', line 8

def register_pause(target)
  pause_targets[@slides.last] ||= []
  pause_targets[@slides.last] << target
end

#unregister_pause(target) ⇒ Object


13
14
15
16
# File 'lib/rabbit/parser/pause-support.rb', line 13

def unregister_pause(target)
  pause_targets[@slides.last] ||= []
  pause_targets[@slides.last].delete(target)
end