Getting the last Friday of the month can be done in one line:
def last_fridays_for_every_month_of_year(year) (1..12).map do |month| Date.new(year, month, -1).downto(0).find(&:friday?) end end
You can use it as follows:
last_fridays_for_every_month_of_year 2013 #=> [#<Date: 2013-01-25 ((2456318j,0s,0n),+0s,2299161j)>, #<Date: 2013-02-22 ((2456346j,0s,0n),+0s,2299161j)>, #<Date: 2013-03-29 ((2456381j,0s,0n),+0s,2299161j)>, #<Date: 2013-04-26 ((2456409j,0s,0n),+0s,2299161j)>, #<Date: 2013-05-31 ((2456444j,0s,0n),+0s,2299161j)>, #<Date: 2013-06-28 ((2456472j,0s,0n),+0s,2299161j)>, #<Date: 2013-07-26 ((2456500j,0s,0n),+0s,2299161j)>, #<Date: 2013-08-30 ((2456535j,0s,0n),+0s,2299161j)>, #<Date: 2013-09-27 ((2456563j,0s,0n),+0s,2299161j)>, #<Date: 2013-10-25 ((2456591j,0s,0n),+0s,2299161j)>, #<Date: 2013-11-29 ((2456626j,0s,0n),+0s,2299161j)>, #<Date: 2013-12-27 ((2456654j,0s,0n),+0s,2299161j)>]