Class: Legendary::Gems

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/legendary/gems.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGems

Returns a new instance of Gems.



10
11
12
# File 'lib/legendary/gems.rb', line 10

def initialize
  @bundler = Bundler.load
end

Instance Attribute Details

#bundlerObject

Returns the value of attribute bundler.



5
6
7
# File 'lib/legendary/gems.rb', line 5

def bundler
  @bundler
end

Instance Method Details

#definitionsObject



22
23
24
25
26
27
# File 'lib/legendary/gems.rb', line 22

def definitions
  # TODO: locking from gemsurance
  @definitions ||= Bundler.definition(true).tap do |definition|
    definition.resolve_remotely!
  end
end

#eachObject



14
15
16
17
18
19
20
# File 'lib/legendary/gems.rb', line 14

def each
  specs.each do |spec|
    yield Legendary::Info.new(spec,
                              dependencies,
                              definitions)
  end
end