module MiGA::Common::Path

Public Instance Methods

root_path() click to toggle source

Root path to MiGA (as estimated from the location of the current file).

# File lib/miga/common/path.rb, line 6
def root_path
  File.expand_path('../../../..', __FILE__)
end
script_path(task, opts={}) click to toggle source

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).

# File lib/miga/common/path.rb, line 14
def script_path(task, opts={})
  opts[:miga] ||= root_path
  File.expand_path("scripts/#{task}.bash", opts[:miga])
end