Method: MigrationBundler::Project.load

Defined in:
lib/migration_bundler/project.rb

.load(path = Dir.pwd) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/migration_bundler/project.rb', line 7

def load(path = Dir.pwd)
  @project ||= proc do
    project_path = File.join(path, '.migration_bundler.yml')
    raise "fatal: Not a migration_bundler repository: no .migration_bundler.yml" unless File.exists?(project_path)
    options = YAML.load(File.read(project_path))
    new(options)
  end.call
end