Module: IceCube::Validations::HourOfDay

Includes:
Lock
Included in:
IceCube::ValidatedRule
Defined in:
lib/ice_cube/validations/hour_of_day.rb

Defined Under Namespace

Classes: Validation

Constant Summary

Constants included from Lock

Lock::INTERVALS

Instance Method Summary collapse

Methods included from Lock

#validate

Instance Method Details

#hour_of_day(*hours) ⇒ Object

Add hour of day validations



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

def hour_of_day(*hours)
  hours.each do |hour|
    validations_for(:hour_of_day) << Validation.new(hour)
  end
  clobber_base_validations(:hour)
  self
end