module NRSER
Public Class Methods
git_root(from)
click to toggle source
# File lib/nrser/extras.rb, line 9 def git_root from path = Pathname.new from path = path.dirname unless path.directory? Dir.chdir path do Pathname.new Cmds!("git rev-parse --show-toplevel").out.chomp end end