Fix bugs related to input ranges

This commit is contained in:
Glenn Y. Rolland 2017-09-26 07:49:21 +02:00
parent c2524fc675
commit d5d04412b6
2 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,7 @@
# A sample Gemfile
source "https://rubygems.org"
# gem "pry"
# Specify your gem's dependencies in timecost.gemspec
gemspec

View file

@ -174,12 +174,18 @@ module TimeCost
def analyze_dumps
#read ranges
@rangelist = RangeList.new
@config[:input_dump].each do |filename|
rangelist = YAML::load(File.open(filename,"r"))
filelists = YAML::load(File.open(filename,"r"))
# require 'pry'
# binding.pry
filelists.each do |author, rangelist|
# create list if author is new
@rangelist[author] ||= RangeList.new
rangelist.each do |range|
@rangelist.add range
@rangelist[author].add range
end
end
end
end