module FBO::Parser::AmendmentHandler TAGS = %w( AMDCSS DATE YEAR CBAC PASSWORD ZIP CLASSCOD NAICS OFFADD NTYPE) + %w( AGENCY OFFICE LOCATION SUBJECT SOLNBR RESPDATE ARCHDATE CONTACT DESC ) + %w( LINK URL EMAIL ADDRESS SETASIDE POPADDRESS POPZIP POPCOUNTRY \/AMDCSS ) ANY_AMDCSS_TAG = TAGS.join("|") AMENDMENT_PATTERN = /^/ def is_amendment?(text) text =~ AMENDMENT_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), response_date: response_date(text), archive_date: archive_date(text), contact_info: contact(text), description: description(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), pop_address: pop_address(text), pop_zip: pop_zip_code(text), pop_country: pop_country(text) } FBO::Notices::Amendment.new(params) end protected # Returns a concatenated list of all tags for the notice # # @return [String] def any_notice_tag ANY_AMDCSS_TAG end extend FBO::Parser::NoticeHandler extend FBO::Parser::ParserHelper extend self end