Class: RRule::Weekly

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

Instance Attribute Summary

Attributes inherited from Frequency

#current_date, #filters, #generator, #timeset

Instance Method Summary collapse

Methods inherited from Frequency

#advance, for_options, #initialize, #next_occurrences

Constructor Details

This class inherits a constructor from RRule::Frequency

Instance Method Details

#possible_daysObject



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

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