Using the standard ruby range:

(Date.new(2018, 01, 01)..Date.new(2018, 01, 30)).each do |date|
  # Do stuff with date
end

Using the Date method upto:

Date.new(2018, 01, 01).upto(Date.new(2018, 01, 30)) do |date|
  # Do stuff with date
end
[Daily Tip] How to open your IDE with `code` in macOS