Class: Async::Cron::Weekday

Inherits:
Period
  • Object
show all
Defined in:
lib/async/cron/period.rb

Constant Summary collapse

RANGE =
0..6

Instance Method Summary collapse

Methods inherited from Period

#include?, #initialize, parse, #step, #to_a

Constructor Details

This class inherits a constructor from Async::Cron::Period

Instance Method Details

#increment(time) ⇒ Object



197
198
199
# File 'lib/async/cron/period.rb', line 197

def increment(time)
  time.weekday = @successors[time.weekday]
end

#reset(time) ⇒ Object



201
202
203
# File 'lib/async/cron/period.rb', line 201

def reset(time)
  time.weekday = @values.first
end

#value_from(time) ⇒ Object



205
206
207
# File 'lib/async/cron/period.rb', line 205

def value_from(time)
  time.weekday
end