class OboParser::Tokens::ValuePair

returns key => value hash for tokens like 'foo=bar' or foo = 'b a ar' note we grab EOL and ; here

Public Class Methods

new(str) click to toggle source
# File lib/obo_parser/tokens.rb, line 216
def initialize(str)
  str.strip!
  str = str.split(/=/)
  str[1].strip!
  str[1] = str[1][1..-2] if str[1][0..0] == "'" 
  str[1] = str[1][1..-2] if str[1][0..0] ==  "\"" 
  @value = {str[0].strip.downcase.to_sym => str[1].strip}
end