Module: IceCube::Validations::Day

Included in:
IceCube::ValidatedRule
Defined in:
lib/ice_cube/validations/day.rb

Defined Under Namespace

Classes: Validation

Instance Method Summary collapse

Instance Method Details

#day(*days) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/ice_cube/validations/day.rb', line 7

def day(*days)
  days.each do |day|
    day = TimeUtil.symbol_to_day(day.to_sym) if day.is_a?(Symbol) or day.is_a?(String)
    validations_for(:day) << Validation.new(day)
  end
  clobber_base_validations(:wday, :day)
  self
end