Class: CrontabAsterisk
- Inherits:
-
AbstractCrontabField
- Object
- AbstractCrontabField
- CrontabAsterisk
- Defined in:
- lib/crontab_fields.rb
Instance Method Summary collapse
-
#initialize(step = nil) ⇒ CrontabAsterisk
constructor
A new instance of CrontabAsterisk.
- #to_s ⇒ Object
Methods inherited from AbstractCrontabField
Constructor Details
#initialize(step = nil) ⇒ CrontabAsterisk
Returns a new instance of CrontabAsterisk.
42 43 44 |
# File 'lib/crontab_fields.rb', line 42 def initialize(step=nil) step.nil? ? @step = 1 : @step = step.to_i end |
Instance Method Details
#to_s ⇒ Object
45 46 47 48 49 |
# File 'lib/crontab_fields.rb', line 45 def to_s as_s = '*' as_s += "/#{@step}" if @step > 1 as_s end |