Class: Jsonerino::Token
- Inherits:
-
Object
- Object
- Jsonerino::Token
- Defined in:
- lib/jsonerino/token.rb
Constant Summary collapse
- TOKEN_ID =
:token_id
- TOKEN_STRING =
:token_string
- TOKEN_NUMBER =
:token_number
- TOKEN_LCURLY =
:token_lcurly
- TOKEN_RCURLY =
:token_rcurly
- TOKEN_LBRACKET =
:token_lbracket
- TOKEN_RBRACKET =
:token_rbracket
- TOKEN_COMMA =
:token_comma
- TOKEN_COLON =
:token_colon
Instance Attribute Summary collapse
-
#finish ⇒ Object
readonly
Returns the value of attribute finish.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(token, value, start, finish, line) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(token, value, start, finish, line) ⇒ Token
Returns a new instance of Token.
15 16 17 18 19 20 21 |
# File 'lib/jsonerino/token.rb', line 15 def initialize(token, value, start, finish, line) @token = token @value = value @start = start @finish = finish @line = line end |
Instance Attribute Details
#finish ⇒ Object (readonly)
Returns the value of attribute finish.
13 14 15 |
# File 'lib/jsonerino/token.rb', line 13 def finish @finish end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
13 14 15 |
# File 'lib/jsonerino/token.rb', line 13 def line @line end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
13 14 15 |
# File 'lib/jsonerino/token.rb', line 13 def start @start end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
13 14 15 |
# File 'lib/jsonerino/token.rb', line 13 def token @token end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
13 14 15 |
# File 'lib/jsonerino/token.rb', line 13 def value @value end |