Class: Lkml::Tokens::ContentToken
Direct Known Subclasses
ExpressionBlockToken, LiteralToken, QuotedLiteralToken, TriviaToken
Constant Summary
Constants inherited from Token
Instance Attribute Summary collapse
-
#value ⇒ Object
literals may be mutated after lex (e.g. hyphen join).
Attributes inherited from Token
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(value, line_number) ⇒ ContentToken
constructor
A new instance of ContentToken.
Methods inherited from Token
Constructor Details
#initialize(value, line_number) ⇒ ContentToken
Returns a new instance of ContentToken.
36 37 38 39 |
# File 'lib/lkml/tokens.rb', line 36 def initialize(value, line_number) super(line_number) @value = value end |
Instance Attribute Details
#value ⇒ Object
literals may be mutated after lex (e.g. hyphen join)
34 35 36 |
# File 'lib/lkml/tokens.rb', line 34 def value @value end |
Instance Method Details
#==(other) ⇒ Object
41 42 43 |
# File 'lib/lkml/tokens.rb', line 41 def ==(other) instance_of?(other.class) && value == other.value end |
#eql?(other) ⇒ Boolean
45 46 47 |
# File 'lib/lkml/tokens.rb', line 45 def eql?(other) self == other end |
#hash ⇒ Object
49 50 51 |
# File 'lib/lkml/tokens.rb', line 49 def hash [self.class, value].hash end |