# File lib/timeliness/format_set.rb, line 17 def compile! regexp_string = '' @formats.inject(0) { |index, format_string| format = Format.new(format_string).compile! @formats_hash[format_string] = format @match_indexes[index] = format regexp_string = "#{regexp_string}(#{format.regexp_string})|" index + format.token_count + 1 # add one for wrapper capture } @regexp = %r[\A(?:#{regexp_string.chop})\z] self end