Class: Ruby::Rego::AST::SetLiteral
- Defined in:
- lib/ruby/rego/ast/composite.rb
Overview
Represents a set literal.
Instance Attribute Summary collapse
-
#elements ⇒ Array<Object>
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(elements:, location: nil) ⇒ SetLiteral
constructor
A new instance of SetLiteral.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(elements:, location: nil) ⇒ SetLiteral
Returns a new instance of SetLiteral.
38 39 40 41 |
# File 'lib/ruby/rego/ast/composite.rb', line 38 def initialize(elements:, location: nil) super(location: location) @elements = elements.dup.freeze end |
Instance Attribute Details
#elements ⇒ Array<Object> (readonly)
44 45 46 |
# File 'lib/ruby/rego/ast/composite.rb', line 44 def elements @elements end |