Module: MiGA::Common::Path
- Included in:
- MiGA
- Defined in:
- lib/miga/common/path.rb
Instance Method Summary collapse
-
#root_path ⇒ Object
Root path to MiGA (as estimated from the location of the current file).
-
#script_path(task, opts = {}) ⇒ Object
Path to a script to be executed for
task.
Instance Method Details
#root_path ⇒ Object
Root path to MiGA (as estimated from the location of the current file).
6 7 8 |
# File 'lib/miga/common/path.rb', line 6 def root_path File.('../../../..', __FILE__) end |
#script_path(task, opts = {}) ⇒ Object
Path to a script to be executed for task. Supported opts are:
-
:migaPath to the MiGA home to use. If not passed, the home of the library is used).
14 15 16 17 |
# File 'lib/miga/common/path.rb', line 14 def script_path(task, opts={}) opts[:miga] ||= root_path File.("scripts/#{task}.bash", opts[:miga]) end |