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:
132 133 134 135 136 137 138 139 140 |
# File 'lib/functions.rb', line 132 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 |