Module: IceCube::Validations::DayOfWeek

Included in:
DailyRule, HourlyRule, MinutelyRule, MonthlyRule, SecondlyRule, WeeklyRule, YearlyRule
Defined in:
lib/ice_cube/validations/day_of_week.rb

Defined Under Namespace

Classes: Validation

Instance Method Summary collapse

Instance Method Details

#day_of_week(dows) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/ice_cube/validations/day_of_week.rb', line 3

def day_of_week(dows)
  dows.each do |day, occs|
    occs.each do |occ|
      day = TimeUtil.sym_to_wday(day)
      validations_for(:day_of_week) << Validation.new(day, occ)
    end
  end
  clobber_base_validations :day, :wday
  self
end