Skip to content

Commit

Permalink
Add comment, change method name to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
auxesis committed Dec 18, 2016
1 parent c90886c commit 8bf7075
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def finalise_record!
@record = nil
end

def fix_record_offsets!
# Fix values being spread across multiple records incorrectly
def fix_spread_values!
@records.each_with_index do |record, index|
offset = record['imposed_penalties'].size - record['offence_proven'].size
case offset
Expand Down Expand Up @@ -290,7 +291,7 @@ def extract_records_from_pages(pages)
build_records(raw_lines, columns)
end

fix_record_offsets!
fix_spread_values!

@records
end
Expand Down

0 comments on commit 8bf7075

Please sign in to comment.