Class: CrontabMinute

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

Constant Summary collapse

@@min =
0
@@max =
59

Instance Method Summary collapse

Methods inherited from AbstractCrontabField

create_from_string, #to_s

Constructor Details

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

Returns a new instance of CrontabMinute.



55
56
57
58
59
# File 'lib/crontab_fields.rb', line 55

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