Module: NCBIBlastResultsParser
- Defined in:
- lib/ncbi_blast_results_parser.rb,
lib/ncbi_blast_results_parser/version.rb,
lib/ncbi_blast_results_parser/rid_parser.rb,
lib/ncbi_blast_results_parser/status_parser.rb
Defined Under Namespace
Classes: RIDParser, StatusParser
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.rid(response) ⇒ Object
Parse a Request ID from an NCBI Blast.
-
.status(response) ⇒ Object
Parse the status from an NCBI Blast.
-
.wait(response) ⇒ Object
Parse the suggested wait time for an NCBI Blast.
Class Method Details
.rid(response) ⇒ Object
Parse a Request ID from an NCBI Blast
Returns a String
12 13 14 15 16 17 |
# File 'lib/ncbi_blast_results_parser.rb', line 12 def self.rid(response) rid_parser = NCBIBlastResultsParser::RIDParser.new parser = Nokogiri::HTML::SAX::Parser.new(rid_parser) parser.parse(response) rid_parser.rid end |
.status(response) ⇒ Object
Parse the status from an NCBI Blast
Returns a String
32 33 34 35 36 37 |
# File 'lib/ncbi_blast_results_parser.rb', line 32 def self.status(response) status_parser = NCBIBlastResultsParser::StatusParser.new parser = Nokogiri::HTML::SAX::Parser.new(status_parser) parser.parse(response) status_parser.status end |
.wait(response) ⇒ Object
Parse the suggested wait time for an NCBI Blast
Returns an Integer
22 23 24 25 26 27 |
# File 'lib/ncbi_blast_results_parser.rb', line 22 def self.wait(response) rid_parser = NCBIBlastResultsParser::RIDParser.new parser = Nokogiri::HTML::SAX::Parser.new(rid_parser) parser.parse(response) rid_parser.wait end |