Class: CrontabHour
- Inherits:
-
AbstractCrontabField
- Object
- AbstractCrontabField
- CrontabHour
- Defined in:
- lib/crontab_fields.rb
Constant Summary collapse
- @@min =
0- @@max =
23
Instance Method Summary collapse
-
#initialize(start, stop = nil, step = nil) ⇒ CrontabHour
constructor
A new instance of CrontabHour.
Methods inherited from AbstractCrontabField
Constructor Details
#initialize(start, stop = nil, step = nil) ⇒ CrontabHour
Returns a new instance of CrontabHour.
65 66 67 68 69 |
# File 'lib/crontab_fields.rb', line 65 def initialize(start, stop=nil, step=nil) super(start, stop, step) raise "Hour field #{@start} must not be greater than #{@@min}" if @start < @@min raise "Hour field #{@stop} must not be greater than #{@@max}" if @stop > @@max end |