Class: RRule::Weekly

Inherits:
Frequency show all
Defined in:
lib/rrule/frequencies/weekly.rb

Instance Attribute Summary

Attributes inherited from Frequency

#current_date

Instance Method Summary collapse

Methods inherited from Frequency

#advance, #initialize

Constructor Details

This class inherits a constructor from RRule::Frequency

Instance Method Details

#possible_daysObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/rrule/frequencies/weekly.rb', line 3

def possible_days
  i = current_date.yday - 1
  possible_days = []
  7.times do
    possible_days.push(i)
    i += 1
    break if context.weekday_by_day_of_year[i] == context.options[:wkst]
  end
  possible_days
end