Class: Lexer::Token
- Inherits:
-
Object
- Object
- Lexer::Token
- Defined in:
- lib/special-giggle/lexer.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(string, type) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(string, type) ⇒ Token
Returns a new instance of Token.
7 8 9 |
# File 'lib/special-giggle/lexer.rb', line 7 def initialize(string, type) @string, @type = string, type end |
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
5 6 7 |
# File 'lib/special-giggle/lexer.rb', line 5 def string @string end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/special-giggle/lexer.rb', line 5 def type @type end |