Class: NewickToken

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

Overview

Represents a token (substring with meaning) in a Newick parse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, value) ⇒ NewickToken

Returns a new instance of NewickToken.



12
13
14
15
# File 'lib/Newick.rb', line 12

def initialize(type, value)
  @type = type
  @value = value
end

Instance Attribute Details

#typeObject (readonly)

semantic meaning of token (label, weight, etc.)



8
9
10
# File 'lib/Newick.rb', line 8

def type
  @type
end

#valueObject (readonly)

string value of token



10
11
12
# File 'lib/Newick.rb', line 10

def value
  @value
end