class Chronic::Repeater
def self.scan(tokens, options)
-
(Array)
- list of tokens
Parameters:
-
options
(Hash
) -- Options specified in {Chronic.parse} -
tokens
(Array
) -- Array of tokens to scan
def self.scan(tokens, options) tokens.each_index do |i| if t = scan_for_season_names(tokens[i]) then tokens[i].tag(t); next end if t = scan_for_month_names(tokens[i]) then tokens[i].tag(t); next end if t = scan_for_day_names(tokens[i]) then tokens[i].tag(t); next end if t = scan_for_day_portions(tokens[i]) then tokens[i].tag(t); next end if t = scan_for_times(tokens[i]) then tokens[i].tag(t); next end if t = scan_for_units(tokens[i]) then tokens[i].tag(t); next end end end