class Chronic::Grabber
def self.scan(tokens, options)
options - The Hash of options specified in Chronic::parse.
tokens - An Array of Token objects to scan.
each token.
Scan an Array of Tokens and apply any necessary Grabber tags to
def self.scan(tokens, options) tokens.each do |token| if t = scan_for_all(token) then token.tag(t); next end end end
def self.scan_for_all(token)
token - The Token object to scan.
def self.scan_for_all(token) scan_for token, self, { /last/ => :last, /this/ => :this, /next/ => :next } end
def to_s
def to_s 'grabber-' << @type.to_s end