def parse(value_spec)
      case value_spec
        when WildcardPattern
          WildcardCronValue.new(@lower_limit, @upper_limit)
        when @single_value_pattern
          SingleValueCronValue.new(@lower_limit, @upper_limit, convert_value($1))
        when @range_pattern
          RangeCronValue.new(@lower_limit, @upper_limit, convert_value($1), convert_value($2))
        when @step_pattern
          StepCronValue.new(@lower_limit, @upper_limit, $1.to_i)
        else
          raise "Unrecognized cron specification pattern."
      end
    end
def parse(value_spec)
      case value_spec
        when WildcardPattern
          WildcardCronValue.new(@lower_limit, @upper_limit)
        when @single_value_pattern
          SingleValueCronValue.new(@lower_limit, @upper_limit, convert_value($1))
        when @range_pattern
          RangeCronValue.new(@lower_limit, @upper_limit, convert_value($1), convert_value($2))
        when @step_pattern
          StepCronValue.new(@lower_limit, @upper_limit, $1.to_i)
        else
          raise "Unrecognized cron specification pattern."
      end
    end
Constructs a new CronSpecificationFactory


 Parses a unit of a cron specification.
 The supported patterns for parsing are one of:

 * Wildcard '*'
 * Single Scalar Value [0-9]+|(sun|mon|tue|wed|thu|fri|sat)|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)
 * Range value (0-9, mon-fri, etc.)
 * Step value (*/[0-9]+)