Class: OboParser::Tokens::DisjointFromTag

Inherits:
Token
  • Object
show all
Defined in:
lib/tokens.rb

Instance Attribute Summary collapse

Attributes inherited from Token

#value

Instance Method Summary collapse

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

#commentObject (readonly)

, :qualifier



164
165
166
# File 'lib/tokens.rb', line 164

def comment
  @comment
end

, :qualifier



164
165
166
# File 'lib/tokens.rb', line 164

def related_term
  @related_term
end

#relationObject (readonly)

, :qualifier



164
165
166
# File 'lib/tokens.rb', line 164

def relation
  @relation
end

#tagObject (readonly)

, :qualifier



164
165
166
# File 'lib/tokens.rb', line 164

def tag
  @tag
end

#xrefsObject (readonly)

, :qualifier



164
165
166
# File 'lib/tokens.rb', line 164

def xrefs
  @xrefs
end