Class: Hocon::Impl::Token
- Inherits:
-
Object
- Object
- Hocon::Impl::Token
- Defined in:
- lib/hocon/impl/token.rb
Instance Attribute Summary collapse
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token_type, origin, debug_string = nil) ⇒ Token
constructor
A new instance of Token.
- #line_number ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(token_type, origin, debug_string = nil) ⇒ Token
Returns a new instance of Token.
9 10 11 12 13 |
# File 'lib/hocon/impl/token.rb', line 9 def initialize(token_type, origin, debug_string = nil) @token_type = token_type @origin = origin @debug_string = debug_string end |
Instance Attribute Details
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
15 16 17 |
# File 'lib/hocon/impl/token.rb', line 15 def origin @origin end |
Class Method Details
Instance Method Details
#line_number ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/hocon/impl/token.rb', line 17 def line_number if @origin @origin.line_number else -1 end end |