lib/chronic/scalar.rb in chronic-0.4.0 vs lib/chronic/scalar.rb in chronic-0.4.1
- old
+ new
@@ -1,12 +1,10 @@
module Chronic
-
class Scalar < Tag #:nodoc:
DAY_PORTIONS = %w( am pm morning afternoon evening night )
def self.scan(tokens, options)
- # for each token
tokens.each_index do |i|
if t = scan_for_scalars(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
if t = scan_for_days(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
if t = scan_for_months(tokens[i], tokens[i + 1]) then tokens[i].tag(t) end
if t = scan_for_years(tokens[i], tokens[i + 1], options) then tokens[i].tag(t) end
@@ -78,7 +76,6 @@
class ScalarYear < Scalar #:nodoc:
def to_s
super << '-year-' << @type.to_s
end
end
-
-end
+end
\ No newline at end of file