This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Continuing with the birthdays, todays_birthdays, session, spreadsheet, and ws objects created above... | |
(1..ws.num_rows).each do |row| | |
name = ws[row, 1] | |
birthday = todays_birthdays.find { |bday| bday[:name] == name } | |
next unless birthday | |
next_birthday = birthday[:date].next_year.to_s | |
ws[row, 2] = next_birthday |
OlderNewer