Class: JSONP3::FilterExpressionLiteral
Overview
Base class for expression literals.
Instance Attribute Summary collapse
Attributes inherited from Expression
#token
Instance Method Summary
collapse
Constructor Details
89
90
91
92
|
# File 'lib/json_p3/filter.rb', line 89
def initialize(token, value)
super(token)
@value = value
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
87
88
89
|
# File 'lib/json_p3/filter.rb', line 87
def value
@value
end
|
Instance Method Details
#==(other) ⇒ Object
Also known as:
eql?
102
103
104
105
106
|
# File 'lib/json_p3/filter.rb', line 102
def ==(other)
self.class == other.class &&
@value == other.value &&
@token == other.token
end
|
#evaluate(_context) ⇒ Object
94
95
96
|
# File 'lib/json_p3/filter.rb', line 94
def evaluate(_context)
@value
end
|
#hash ⇒ Object
110
111
112
|
# File 'lib/json_p3/filter.rb', line 110
def hash
[@value, @token].hash
end
|
#to_s ⇒ Object
98
99
100
|
# File 'lib/json_p3/filter.rb', line 98
def to_s
@value.to_s
end
|