Module: Kernel

Defined in:
lib/warp_drive.rb

Overview

Hash

Instance Method Summary collapse

Instance Method Details

#run_onceObject

:nodoc:



19
20
21
22
23
24
25
# File 'lib/warp_drive.rb', line 19

def run_once
  path = File.expand_path(caller.first)
  unless ($__already_run_block ||= []).include?(path)
    yield
    $__already_run_block << path
  end
end