class LicenseStatus::Expired def filter(licenses) licenses.where('expired_at < ?', DateTime.now) end def matches?(name) to_s == name end def best_represents?(license) license.expired_at < DateTime.now end def to_s 'expired' end end