Method: Datasets::PenguinsRawData::SpeciesBase#each

Defined in:
lib/datasets/penguins.rb

#eachObject



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/datasets/penguins.rb', line 36

def each
  return to_enum(__method__) unless block_given?

  open_data do |csv|
    csv.each do |row|
      next if row[0].nil?
      record = Record.new(*row.fields)
      yield record
    end
  end
end