Class: NexusParser::Tokens::Label

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

Overview

same as ID

Instance Attribute Summary

Attributes inherited from Token

#value

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ Label

Returns a new instance of Label.



77
78
79
80
81
82
83
# File 'lib/tokens.rb', line 77

def initialize(str)
  str.strip!
  str = str[1..-2] if str[0..0] == "'" # get rid of quote marks
  str = str[1..-2] if str[0..0] == '"' 
  str.strip! 
  @value = str
end