Class: TSS::Link
- Inherits:
-
Object
- Object
- TSS::Link
- Defined in:
- lib/tss/link.rb
Overview
Class representing links(suffixes) between vertexes
Instance Attribute Summary collapse
-
#char ⇒ Object
readonly
Character to simplify search.
-
#end_index ⇒ Object
Index of word in dictionary if vertex is ending, or nil if vertex is suffix.
-
#vertex ⇒ Object
Linked vertex.
Instance Method Summary collapse
-
#initialize(vertex, end_index = nil) ⇒ Link
constructor
Create new ACT::Link object.
Constructor Details
#initialize(vertex, end_index = nil) ⇒ Link
Create new ACT::Link object
22 23 24 25 26 |
# File 'lib/tss/link.rb', line 22 def initialize(vertex, end_index = nil) @vertex = vertex @char = @vertex.char @end_index = end_index end |
Instance Attribute Details
#char ⇒ Object (readonly)
Character to simplify search
14 15 16 |
# File 'lib/tss/link.rb', line 14 def char @char end |
#end_index ⇒ Object
Index of word in dictionary if vertex is ending, or nil if vertex is suffix
18 19 20 |
# File 'lib/tss/link.rb', line 18 def end_index @end_index end |
#vertex ⇒ Object
Linked vertex
11 12 13 |
# File 'lib/tss/link.rb', line 11 def vertex @vertex end |