Module: IceCube::Validations::WeeklyInterval

Included in:
WeeklyRule
Defined in:
lib/ice_cube/validations/weekly_interval.rb

Defined Under Namespace

Classes: Validation

Instance Method Summary collapse

Instance Method Details

#interval(interval, week_start = :sunday) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/ice_cube/validations/weekly_interval.rb', line 3

def interval(interval, week_start = :sunday)
  @interval = normalized_interval(interval)
  @week_start = TimeUtil.wday_to_sym(week_start)
  replace_validations_for(:interval, [Validation.new(@interval, week_start)])
  clobber_base_validations(:day)
  self
end