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

Method require_embedded_absolute

ruby/engine/embedded_help.rb:248–265  ·  view source on GitHub ↗
path

Source from the content-addressed store, hash-verified

246 end
247
248 def require_embedded_absolute path
249 original_directory = Dir.pwd
250
251 $LOADED << path
252 s = EmbeddedScripting::getFileAsString(path)
253 s = OpenStudio::preprocess_ruby_script(s)
254
255 result = Kernel::eval(s,BINDING,path)
256
257
258 current_directory = Dir.pwd
259 if original_directory != current_directory
260 Dir.chdir(original_directory)
261 STDOUT.flush
262 end
263
264 return result
265 end
266
267 def require_relative path
268 absolute_path = File.dirname(caller_locations(1,1)[0].path) + '/' + path

Callers

nothing calls this directly

Calls 4

chdirMethod · 0.80
flushMethod · 0.80
evalMethod · 0.45

Tested by

no test coverage detected