Class: Binford::GemfileStats

Inherits:
Object
  • Object
show all
Defined in:
lib/binford/gemfile_stats.rb

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ GemfileStats

Returns a new instance of GemfileStats.



5
6
7
# File 'lib/binford/gemfile_stats.rb', line 5

def initialize(file_path)
  @file_path = file_path
end

Instance Method Details

#gemsObject



15
16
17
# File 'lib/binford/gemfile_stats.rb', line 15

def gems
  @gems ||= parse_gems
end

#statsObject



9
10
11
12
13
# File 'lib/binford/gemfile_stats.rb', line 9

def stats
  gems.map do |gem, version|
    Thread.new { analyze(gem, version) }
  end.map(&:value)
end