Class: Ruby::Rego::AST::ArrayLiteral
- Defined in:
- lib/ruby/rego/ast/composite.rb
Overview
Represents an array literal.
Instance Attribute Summary collapse
-
#elements ⇒ Array<Object>
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(elements:, location: nil) ⇒ ArrayLiteral
constructor
A new instance of ArrayLiteral.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(elements:, location: nil) ⇒ ArrayLiteral
Returns a new instance of ArrayLiteral.
12 13 14 15 |
# File 'lib/ruby/rego/ast/composite.rb', line 12 def initialize(elements:, location: nil) super(location: location) @elements = elements.dup.freeze end |
Instance Attribute Details
#elements ⇒ Array<Object> (readonly)
18 19 20 |
# File 'lib/ruby/rego/ast/composite.rb', line 18 def elements @elements end |