Class: NewickToken
- Inherits:
-
Object
- Object
- NewickToken
- Defined in:
- lib/Newick.rb
Overview
Represents a token (substring with meaning) in a Newick parse
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
semantic meaning of token (label, weight, etc.).
-
#value ⇒ Object
readonly
string value of token.
Instance Method Summary collapse
-
#initialize(type, value) ⇒ NewickToken
constructor
A new instance of NewickToken.
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
#type ⇒ Object (readonly)
semantic meaning of token (label, weight, etc.)
8 9 10 |
# File 'lib/Newick.rb', line 8 def type @type end |
#value ⇒ Object (readonly)
string value of token
10 11 12 |
# File 'lib/Newick.rb', line 10 def value @value end |