halogenandtoast/timelord

View on GitHub
lib/timelord/matchers/ordinal_matcher.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Timelord
  class OrdinalMatcher < FutureMatcher
    REGEX = /\b(\d{1,2})(#{ORDINAL_MATCHER})\b/i

    private

    def parse_date
      Date.civil(today.year, today.month, ints[1])
    end
  end
end