Class: OboParser::Tokens::DisjointFromTag
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
, :qualifier.
-
#related_term ⇒ Object
readonly
, :qualifier.
-
#relation ⇒ Object
readonly
, :qualifier.
-
#tag ⇒ Object
readonly
, :qualifier.
-
#xrefs ⇒ Object
readonly
, :qualifier.
Attributes inherited from Token
Instance Method Summary collapse
-
#initialize(str) ⇒ DisjointFromTag
constructor
A new instance of DisjointFromTag.
Constructor Details
#initialize(str) ⇒ DisjointFromTag
Returns a new instance of DisjointFromTag.
166 167 168 169 170 171 172 173 174 |
# File 'lib/tokens.rb', line 166 def initialize(str) @tag = 'relationship' @relation = 'disjoint_from' @related_term, @comment = str.split(/\s/,2) @comment ||= "" @comment.gsub!(/\A!\s*/, '') [@relation, @related_term, @comment].map(&:strip!) @xrefs = [] end |
Instance Attribute Details
#comment ⇒ Object (readonly)
, :qualifier
164 165 166 |
# File 'lib/tokens.rb', line 164 def comment @comment end |
#related_term ⇒ Object (readonly)
, :qualifier
164 165 166 |
# File 'lib/tokens.rb', line 164 def @related_term end |
#relation ⇒ Object (readonly)
, :qualifier
164 165 166 |
# File 'lib/tokens.rb', line 164 def relation @relation end |
#tag ⇒ Object (readonly)
, :qualifier
164 165 166 |
# File 'lib/tokens.rb', line 164 def tag @tag end |
#xrefs ⇒ Object (readonly)
, :qualifier
164 165 166 |
# File 'lib/tokens.rb', line 164 def xrefs @xrefs end |