Module: NRSER
- Defined in:
- lib/nrser/extras.rb,
lib/nrser/extras/version.rb
Defined Under Namespace
Modules: Extras
Class Method Summary collapse
Class Method Details
.git_root(from) ⇒ Object
9 10 11 12 13 14 15 16 |
# 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 |