Skip to content

Commit

Permalink
Remove reference to CSV class
Browse files Browse the repository at this point in the history
This moves any uninitialized constant error to the calling code, which hopefully makes it clear to devs that they should` require "csv"` before using the CsvEnumerator.
  • Loading branch information
Mangara committed Jan 25, 2024
1 parent 4d0a82a commit 43e6372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/job-iteration/csv_enumerator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CsvEnumerator
# csv = CSV.open('tmp/files', { converters: :integer, headers: true })
# JobIteration::CsvEnumerator.new(csv).rows(cursor: cursor)
def initialize(csv)
unless csv.instance_of?(CSV)
unless csv.class.name == "CSV"
raise ArgumentError, "CsvEnumerator.new takes CSV object"
end

Expand Down

0 comments on commit 43e6372

Please sign in to comment.