module FBO::Parser::AwardHandler TAGS = %w( AWARD DATE YEAR CBAC PASSWORD ZIP CLASSCOD NAICS OFFADD ) + %w( AGENCY OFFICE LOCATION SUBJECT SOLNBR NTYPE DESC CONTACT AWDNBR AWDAMT ) + %w( LINENBR AWDDATE ARCHDATE AWARDEE AWARDEEDUNS LINK URL EMAIL ADDRESS ) + %w( SETASIDE CORRECTION /AWARD ) ANY_AWARD_TAG = TAGS.join("|") AWARD_PATTERN = /^/ def is_award?(text) text =~ AWARD_PATTERN end def parse(text) params = { date: date(text), year: year(text), zip: zip(text), class_code: classification_code(text), naics_code: naics_code(text), agency: agency(text), office: office(text), location: location(text), office_address: office_address(text), subject: subject(text), solicitation_number: solicitation_number(text), notice_type: notice_type(text), description: description(text), contact_info: contact(text), award_number: award_number(text), award_amount: award_amount(text), line_number: line_number(text), award_date: award_date(text), archive_date: archive_date(text), awardee: awardee(text), awardee_duns: awardee_duns(text), link_url: link_url(text), link_description: link_description(text), email_address: email_address(text), email_description: email_description(text), setaside: set_aside(text), correction: correction?(text) } FBO::Notices::Award.new(params) end protected # Returns a concatenated list of all tags for the notice # # @return [String] def any_notice_tag ANY_AWARD_TAG end extend FBO::Parser::NoticeHandler extend FBO::Parser::ParserHelper extend self end