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).
4 5 6 |
# File 'lib/miga/common/path.rb', line 4 def root_path File.('../../../..', __FILE__) end |
#script_path(task, opts = {}) ⇒ Object
Path to a script to be executed for task
. Supported opts
are:
-
:miga
Path to the MiGA home to use. If not passed, the home of the library is used).
12 13 14 15 |
# File 'lib/miga/common/path.rb', line 12 def script_path(task, opts = {}) opts[:miga] ||= root_path File.("scripts/#{task}.bash", opts[:miga]) end |