vendor/bundle/ruby/1.8/gems/rufus-scheduler-2.0.16/lib/rufus/sc/cronline.rb
# The string used for creating this cronline instance.
#
The string used for creating this cronline instance.
The string used for creating this cronline instance .
def parse_weekdays(item)
      return nil if item == '*'
      items = item.downcase.split(',')
      weekdays = nil
      monthdays = nil
      items.each do |it|
        if it.match(/#[12345]$/)
          raise ArgumentError.new(
            "ranges are not supported for monthdays (#{it})"
          ) if it.index('-')
          (monthdays ||= []) << it
        else
          WEEKDAYS.each_with_index { |a, i| it.gsub!(/#{a}/, i.to_s) }
          its = it.index('-') ? parse_range(it, 0, 7) : [ Integer(it) ]
          its = its.collect { |i| i == 7 ? 0 : i }
          (weekdays ||= []).concat(its)
        end
      end
      weekdays = weekdays.uniq if weekdays
      [ weekdays, monthdays ]
    end
def parse_weekdays ( item ) return nil if item == '*' items = item . downcase . split ( ',' ) weekdays = nil monthdays = nil items . each do | it | if it . match ( / #[12345]$ / ) raise ArgumentError . new ( "ranges are not supported for monthdays (#{it})" ) if it . index ( '-' ) ( monthdays ||= [ ] ) << it else WEEKDAYS . each_with_index { | a , i | it . gsub! ( / #{ a } / , i . to_s ) } its = it . index ( '-' ) ? parse_range ( it , 0 , 7 ) : [ Integer ( it ) ] its = its . collect { | i | i == 7 ? 0 : i } ( weekdays ||= [ ] ) . concat ( its ) end end weekdays = weekdays . uniq if weekdays [ weekdays , monthdays ] end
The string used for creating this cronline instance.
The string used for creating this cronline instance .
item