Sha256: 605aedfe40db3368e41cc967b0aa45bf6b0cc5f143b01a29987cc4ef2f469866

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

class Mona::Package::Indexer
  include Mona::Mixins

  Inject = Mona::Deps[
    "package.builder",
  ]

  include Inject

  sig do
    params(
      packages_lookup_subdir: String,
      project_root: String,
      package_dirname: String
    )
    .returns(T::Array[Mona::Package])
  end
  def call(packages_lookup_subdir, project_root, package_dirname)
    packages_path = File.join(
      project_root,
      packages_lookup_subdir,
      "**",
      Mona::PACKAGE_FILENAME
    )

    Dir[packages_path].map do |package_file_path|
      builder.call(package_file_path, project_root, package_dirname)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mona-0.2.3 lib/mona/package/indexer.rb
mona-0.2.2 lib/mona/package/indexer.rb