Class: OboParser::OboParser::Term
Overview
TODO: likely deprecate and run with one model (Stanza)
Instance Attribute Summary collapse
-
#relationships ⇒ Object
Returns the value of attribute relationships.
Attributes inherited from Stanza
#def, #id, #name, #other_tags
Instance Method Summary collapse
-
#initialize(tags) ⇒ Term
constructor
A new instance of Term.
Methods inherited from Stanza
Constructor Details
#initialize(tags) ⇒ Term
Returns a new instance of Term.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/obo_parser.rb', line 105 def initialize() super @relationships = [] = [] # Loop through "unclaimed" tags and reference those specific to Term while @other_tags.size != 0 t = @other_tags.shift case t.tag when 'relationship' @relationships.push([t.relation, t.]) else .push(t) end end @other_tags = end |
Instance Attribute Details
#relationships ⇒ Object
Returns the value of attribute relationships.
104 105 106 |
# File 'lib/obo_parser.rb', line 104 def relationships @relationships end |