Class: CrontabDay

Inherits:
AbstractCrontabField show all
Defined in:
lib/crontab_fields.rb

Constant Summary collapse

@@min =
1
@@max =
31

Instance Method Summary collapse

Methods inherited from AbstractCrontabField

create_from_string, #to_s

Constructor Details

#initialize(start, stop = nil, step = nil) ⇒ CrontabDay

Returns a new instance of CrontabDay.



75
76
77
78
79
# File 'lib/crontab_fields.rb', line 75

def initialize(start, stop=nil, step=nil)
  super(start, stop, step)
  raise "Day field #{@start} must not be greater than #{@@min}" if @start < @@min
  raise "Day field #{@stop} must not be greater than #{@@max}" if @stop > @@max
end