Class: ODDB::AnalysisParse::AntibodyListParser

Inherits:
Parser show all
Defined in:
ext/analysisparse/src/antibody_list_parser.rb

Constant Summary collapse

LINE_PTRN =
/^([CNS]|N,\s*ex|TP)?\s*Auto/mu
PARSER =
Parse.generate_parser grammar

Constants inherited from Parser

Parser::FOOTNOTE_PTRN, Parser::FOOTNOTE_TYPE, Parser::STOPCHARS

Instance Attribute Summary

Attributes inherited from Parser

#footnotes, #list_title, #permission, #taxpoint_type

Instance Method Summary collapse

Methods inherited from Parser

#footnote_line, #footnote_type, #initialize, #parse_footnotes, #parse_page, #update_footnotes

Constructor Details

This class inherits a constructor from ODDB::AnalysisParse::Parser

Instance Method Details

#parse_line(src) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
# File 'ext/analysisparse/src/antibody_list_parser.rb', line 25

def parse_line(src)
	ast = PARSER.parse(src)
	desc = ''
	data = {
		:description	=> desc,
	}
	extract_text(ast.description, desc)
	if(node = ast.revision)
		data.store(:revision, node.value)
	end
	data
end