Class: Gemstash::Dependencies

Inherits:
Object
  • Object
show all
Defined in:
lib/gemstash/dependencies.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Fetcher

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope: nil, http_client: nil, db_model: nil) ⇒ Dependencies

Returns a new instance of Dependencies.



15
16
17
18
19
# File 'lib/gemstash/dependencies.rb', line 15

def initialize(scope: nil, http_client: nil, db_model: nil)
  @scope = scope
  @http_client = http_client
  @db_model = db_model
end

Class Method Details

.for_privateObject



7
8
9
# File 'lib/gemstash/dependencies.rb', line 7

def self.for_private
  new(scope: "private", db_model: Gemstash::DB::Dependency)
end

.for_upstream(upstream, http_client) ⇒ Object



11
12
13
# File 'lib/gemstash/dependencies.rb', line 11

def self.for_upstream(upstream, http_client)
  new(scope: "upstream/#{upstream}", http_client: http_client)
end

Instance Method Details

#fetch(gems) ⇒ Object



21
22
23
# File 'lib/gemstash/dependencies.rb', line 21

def fetch(gems)
  Fetcher.new(gems, @scope, @http_client, @db_model).fetch
end