Class: Worte::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#correctObject

Returns the value of attribute correct.



5
6
7
# File 'lib/worte/token.rb', line 5

def correct
  @correct
end

#newlineObject

Returns the value of attribute newline.



5
6
7
# File 'lib/worte/token.rb', line 5

def newline
  @newline
end

#positionObject

Returns the value of attribute position.



5
6
7
# File 'lib/worte/token.rb', line 5

def position
  @position
end

#wordObject

Returns the value of attribute word.



5
6
7
# File 'lib/worte/token.rb', line 5

def word
  @word
end