Class: Ruby::Rego::AST::QueryLiteral
- Defined in:
- lib/ruby/rego/ast/query.rb
Overview
Represents a query literal with optional with modifiers.
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
-
#with_modifiers ⇒ Array<WithModifier>
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(expression:, with_modifiers: [], location: nil) ⇒ QueryLiteral
constructor
A new instance of QueryLiteral.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(expression:, with_modifiers: [], location: nil) ⇒ QueryLiteral
Returns a new instance of QueryLiteral.
13 14 15 16 17 |
# File 'lib/ruby/rego/ast/query.rb', line 13 def initialize(expression:, with_modifiers: [], location: nil) super(location: location) @expression = expression @with_modifiers = with_modifiers.dup.freeze end |
Instance Attribute Details
#expression ⇒ Object (readonly)
20 21 22 |
# File 'lib/ruby/rego/ast/query.rb', line 20 def expression @expression end |
#with_modifiers ⇒ Array<WithModifier> (readonly)
23 24 25 |
# File 'lib/ruby/rego/ast/query.rb', line 23 def with_modifiers @with_modifiers end |