Module: Onfire::Event::Debugging::ClassMethods

Defined in:
lib/onfire/debugging.rb

Instance Method Summary collapse

Instance Method Details

#debug(&block) ⇒ Object

Blocks added with #debug are executed on every node while traversing up.

Event.debug do |node, evt|
  puts "traversing #{node}"
end


14
15
16
# File 'lib/onfire/debugging.rb', line 14

def debug(&block)
  debug_blocks << block
end

#debug_blocksObject



18
19
20
# File 'lib/onfire/debugging.rb', line 18

def debug_blocks
  @debug_blocks ||= []
end