Class: CrontabMonth
- Inherits:
-
AbstractCrontabField
- Object
- AbstractCrontabField
- CrontabMonth
- Defined in:
- lib/crontab_fields.rb
Constant Summary collapse
- @@min =
1- @@max =
12
Instance Method Summary collapse
-
#initialize(start, stop = nil, step = nil) ⇒ CrontabMonth
constructor
A new instance of CrontabMonth.
Methods inherited from AbstractCrontabField
Constructor Details
#initialize(start, stop = nil, step = nil) ⇒ CrontabMonth
Returns a new instance of CrontabMonth.
85 86 87 88 89 |
# File 'lib/crontab_fields.rb', line 85 def initialize(start, stop=nil, step=nil) super(start, stop, step) raise "Month field #{@start} must not be greater than #{@@min}" if @start < @@min raise "Month field #{@stop} must not be greater than #{@@max}" if @stop > @@max end |