MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / preprocess_ruby_script

Method preprocess_ruby_script

ruby/engine/embedded_help.rb:44–52  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

42 end
43
44 def self.preprocess_ruby_script(s)
45#puts "self.preprocess_ruby_script before: #{s}"
46 # DLM: temporary hack to get around autoload
47 s.gsub!(/^\s*autoload\s*(:.*?),\s*(.*?)\s*$/, "current_module_ = Module.nesting[0].nil? ? Object : Module.nesting[0]
48 $autoload_hash[current_module_.to_s.to_sym] = {} if $autoload_hash[current_module_.to_s.to_sym].nil?
49 $autoload_hash[current_module_.to_s.to_sym][\\1] = [current_module_, \\2]\n")
50#puts "self.preprocess_ruby_script after: #{s}"
51 return s
52 end
53end
54
55BINDING = Kernel::binding()

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected