module Trails
Constants
- VERSION
Public Class Methods
project_root()
click to toggle source
# File lib/trails.rb, line 6 def self.project_root current_dir = Pathname.new(Dir.pwd) current_dir.ascend do |dir| gemfile = File.exist?(File.join(dir, 'Gemfile')) app_dir = Dir.exist?(File.join(dir, 'app')) return dir if gemfile && app_dir end nil end