Class: OboParser::Tokens::IsATag
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) ⇒ IsATag
constructor
A new instance of IsATag.
Constructor Details
#initialize(str) ⇒ IsATag
Returns a new instance of IsATag.
152 153 154 155 156 157 158 159 160 |
# File 'lib/tokens.rb', line 152 def initialize(str) @tag = 'relationship' @relation = 'is_a' @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
150 151 152 |
# File 'lib/tokens.rb', line 150 def comment @comment end |
#related_term ⇒ Object (readonly)
, :qualifier
150 151 152 |
# File 'lib/tokens.rb', line 150 def @related_term end |
#relation ⇒ Object (readonly)
, :qualifier
150 151 152 |
# File 'lib/tokens.rb', line 150 def relation @relation end |
#tag ⇒ Object (readonly)
, :qualifier
150 151 152 |
# File 'lib/tokens.rb', line 150 def tag @tag end |
#xrefs ⇒ Object (readonly)
, :qualifier
150 151 152 |
# File 'lib/tokens.rb', line 150 def xrefs @xrefs end |