Class: NexusParser::Tokens::LabelBase

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

Direct Known Subclasses

CharacterLabel, Label

Instance Attribute Summary

Attributes inherited from Token

#value

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ LabelBase

Returns a new instance of LabelBase.



83
84
85
86
87
88
89
# File 'lib/nexus_parser/tokens.rb', line 83

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