Sha256: 755a918b2d160b49b86354aa2f839fef19e9d733d1663c30bb1fe48690444acd

Contents?: true

Size: 711 Bytes

Versions: 4

Compression:

Stored size: 711 Bytes

Contents

class MonoRepoDeps::Package::Builder
  include MonoRepoDeps::Mixins

  Inject = MonoRepoDeps::Deps[
    "package.find_root",
    "package.factory"
  ]

  include Inject

  sig do
    params(
      package_path: String,
      project_root: String,
      package_dirname: String
    )
    .returns(MonoRepoDeps::Package)
  end
  def call(package_path, project_root, package_dirname)
    package_root_path = find_root.call(package_path, project_root)
    package_file_path = "#{package_root_path}/#{MonoRepoDeps::PACKAGE_FILENAME}"

    package_init_proc = proc { instance_eval(File.read(package_file_path)) }

    package = factory.call(package_root_path, package_dirname, init_proc: package_init_proc)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mono_repo_deps-0.2.1 lib/mono_repo_deps/package/builder.rb
mono_repo_deps-0.2.0 lib/mono_repo_deps/package/builder.rb
mono_repo_deps-0.1.14 lib/mono_repo_deps/package/builder.rb
mono_repo_deps-0.1.13 lib/mono_repo_deps/package/builder.rb