Module: BlackStack::OCRA
- Defined in:
- lib/functions.rb
Overview
OCRA Supporting Functions
Class Method Summary collapse
-
.require_in_working_path(filename, path, show_path_info = false) ⇒ Object
OCRA files run into a temp folder, where the script is unpacked.
Class Method Details
.require_in_working_path(filename, path, show_path_info = false) ⇒ Object
OCRA files run into a temp folder, where the script is unpacked.
This function is useful to require a configuration file when the script is running inside an OCRA temp folder, since the local folder of the running command is not the filder where the exe file is hosted.
More information:
367 368 369 370 371 372 373 374 375 |
# File 'lib/functions.rb', line 367 def self.require_in_working_path(filename, path, show_path_info=false) puts '' if show_path_info path = File. File.dirname(path) #path = Dir.pwd puts "require_in_working_path.path:#{path}:." if show_path_info file = "#{path}/#{filename}" puts "require_in_working_path.file:#{file}:." if show_path_info require file end |