module Quarter::ScalarScannerPatch
Constants
- QUARTER_AND_YEAR
- YEAR_AND_QUARTER
Public Instance Methods
tokenize(string)
click to toggle source
Calls superclass method
# File lib/quarter/yaml.rb, line 13 def tokenize(string) if !string.empty? && string.match(QUARTER_AND_YEAR) return Quarter.new($2.to_i, $1.to_i) end if !string.empty? && string.match(YEAR_AND_QUARTER) return Quarter.new($1.to_i, $2.to_i) end super string end