Class: NCBIBlastResultsParser::StatusParser
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- NCBIBlastResultsParser::StatusParser
- Defined in:
- lib/ncbi_blast_results_parser/status_parser.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/ncbi_blast_results_parser/status_parser.rb', line 4 def status @status end |
Instance Method Details
#comment(string) ⇒ Object
6 7 8 |
# File 'lib/ncbi_blast_results_parser/status_parser.rb', line 6 def comment(string) parse_status(string) if string.strip.include? 'Status=' end |
#parse_status(string) ⇒ Object
10 11 12 13 |
# File 'lib/ncbi_blast_results_parser/status_parser.rb', line 10 def parse_status(string) line = string[/((?:Status=.*?$){1})/] @status = line.split('=').last end |