Module: Project

Defined in:
lib/project_basepath.rb

Class Method Summary collapse

Class Method Details

.basepath(trigger) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/project_basepath.rb', line 4

def self.basepath(trigger)
  pn = Pathname.new(File.expand_path(File.expand_path(File.expand_path(File.dirname(__FILE__))))).cleanpath
  pn.ascend { |p|
    return p.to_s if File.exists?(p.to_s + '/' + trigger)
  }
  return nil
end