Sha256: 99b171cacf4b013ea0224870e5645487c068b252064fe58d7d658f186a0fe430

Contents?: true

Size: 1.96 KB

Versions: 1

Compression:

Stored size: 1.96 KB

Contents

module RBS
  module Collection
    # This class represent the configration file.
    class Config
      class CollectionNotAvailable < StandardError
      end

      class LockfileGenerator
        attr_reader config: Config
        attr_reader lock: Config?
        attr_reader lock_path: Pathname
        attr_reader gemfile_lock: Bundler::LockfileParser

        def self.generate: (config_path: Pathname, gemfile_lock_path: Pathname, ?with_lockfile: boolish) -> Config

        def initialize: (config_path: Pathname, gemfile_lock_path: Pathname, with_lockfile: boolish) -> void

        def generate: () -> Config

        private

        def assign_gem: (name: String, version: String?) -> void

        def upsert_gem: (gem_entry? old, gem_entry new) -> void

        def gemfile_lock_gems: () { (untyped) -> void } -> void

        def remove_ignored_gems!: () -> void

        def find_source: (name: String) -> untyped

        def find_best_version: (version: String?, versions: Array[String]) -> Gem::Version
      end

      PATH: Pathname

      type gem_entry = {
        'name' => String,
        'version' => String?,
        'ignore' => boolish,
        'source' => Sources::source_entry?
      }

      @config_path: Pathname

      def self.generate_lockfile: (config_path: Pathname, gemfile_lock_path: Pathname, ?with_lockfile: boolish) -> Config

      def self.from_path: (Pathname path) -> Config

      def self.lockfile_of: (Pathname config_path) -> Config?

      def self.to_lockfile_path: (Pathname config_path) -> Pathname

      # config_path is necessary to resolve relative repo_path
      def initialize: (untyped data, config_path: Pathname) -> void

      def add_gem: (untyped gem) -> untyped

      def gem: (String gem_name) -> untyped

      def repo_path: () -> Pathname

      def sources: () -> Array[Sources::_Source]

      def dump_to: (Pathname) -> void

      def gems: () -> Array[untyped]

      def check_rbs_availability!: () -> void
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbs-2.6.0 sig/collection/config.rbs