Class: Ruby::Rego::AST::SetComprehension
- Defined in:
- lib/ruby/rego/ast/comprehension.rb
Overview
Represents a set comprehension.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
-
#term ⇒ Object
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(term:, body:, location: nil) ⇒ SetComprehension
constructor
A new instance of SetComprehension.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(term:, body:, location: nil) ⇒ SetComprehension
Returns a new instance of SetComprehension.
49 50 51 52 53 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 49 def initialize(term:, body:, location: nil) super(location: location) @term = term @body = body.dup.freeze end |
Instance Attribute Details
#body ⇒ Object (readonly)
59 60 61 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 59 def body @body end |
#term ⇒ Object (readonly)
56 57 58 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 56 def term @term end |