Class: Worte::Token
- Inherits:
-
Object
- Object
- Worte::Token
- Defined in:
- lib/worte/token.rb
Instance Attribute Summary collapse
-
#correct ⇒ Object
Returns the value of attribute correct.
-
#newline ⇒ Object
Returns the value of attribute newline.
-
#position ⇒ Object
Returns the value of attribute position.
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize(word, position) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(word, position) ⇒ Token
Returns a new instance of Token.
7 8 9 10 11 12 |
# File 'lib/worte/token.rb', line 7 def initialize(word, position) @word = word @position = position @correct = true @newline = false end |
Instance Attribute Details
#correct ⇒ Object
Returns the value of attribute correct.
5 6 7 |
# File 'lib/worte/token.rb', line 5 def correct @correct end |
#newline ⇒ Object
Returns the value of attribute newline.
5 6 7 |
# File 'lib/worte/token.rb', line 5 def newline @newline end |
#position ⇒ Object
Returns the value of attribute position.
5 6 7 |
# File 'lib/worte/token.rb', line 5 def position @position end |
#word ⇒ Object
Returns the value of attribute word.
5 6 7 |
# File 'lib/worte/token.rb', line 5 def word @word end |