Method: Juli::Util::Repo#initialize

Defined in:
lib/juli/util.rb

#initialize(path = '.') ⇒ Repo

Returns a new instance of Repo.



107
108
109
110
111
112
113
114
115
116
# File 'lib/juli/util.rb', line 107

def initialize(path = '.')
  Pathname.new(path).realpath.ascend do |p|
    p_str = File.join(p, Juli::REPO)
    if File.directory?(p_str)
      @juli_repo = p
      return
    end
  end
  raise "cannot find juli repository root."
end