class Cronut::Parser::Step
Private Instance Methods
generate_possibilities()
click to toggle source
# File lib/cronut/parser/step.rb, line 6 def generate_possibilities start, step = segment.split('/', 2) start = minimum if start == '*' start = safely_convert_to_integer(start) step = safely_convert_to_integer(step) raise ArgumentError, 'start exceeds maximum' if start > maximum raise ArgumentError, 'step exceeds maximum' if step > maximum start.upto(maximum).each_slice(step).map(&:first) end