Class: Rubycop::Analyzer::Ruby::Token

Inherits:
Node
  • Object
show all
Defined in:
lib/rubycop/analyzer/ruby/tokens.rb

Direct Known Subclasses

Char, Float, Identifier, Integer, Keyword, Label, Symbol

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(token, position) ⇒ Token

Returns a new instance of Token.



5
6
7
8
# File 'lib/rubycop/analyzer/ruby/tokens.rb', line 5

def initialize(token, position)
  @token    = token
  @position = position
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



11
12
13
# File 'lib/rubycop/analyzer/ruby/tokens.rb', line 11

def position
  @position
end

#tokenObject (readonly)

Returns the value of attribute token.



10
11
12
# File 'lib/rubycop/analyzer/ruby/tokens.rb', line 10

def token
  @token
end