Class: Rubocop::Cop::Token
- Inherits:
-
Object
- Object
- Rubocop::Cop::Token
- Defined in:
- lib/rubocop/cop/cop.rb
Instance Attribute Summary collapse
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(pos, type, text) ⇒ Token
constructor
A new instance of Token.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
22 23 24 |
# File 'lib/rubocop/cop/cop.rb', line 22 def pos @pos end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
22 23 24 |
# File 'lib/rubocop/cop/cop.rb', line 22 def text @text end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
22 23 24 |
# File 'lib/rubocop/cop/cop.rb', line 22 def type @type end |
Instance Method Details
#to_s ⇒ Object
28 29 30 |
# File 'lib/rubocop/cop/cop.rb', line 28 def to_s "[[#{@pos.lineno}, #{@pos.column}], #@type, #{@text.inspect}]" end |