Class: Ruby::Rego::AST::ObjectComprehension
- Defined in:
- lib/ruby/rego/ast/comprehension.rb
Overview
Represents an object comprehension.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
-
#term ⇒ Object
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(term:, body:, location: nil) ⇒ ObjectComprehension
constructor
A new instance of ObjectComprehension.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(term:, body:, location: nil) ⇒ ObjectComprehension
Returns a new instance of ObjectComprehension.
31 32 33 34 35 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 31 def initialize(term:, body:, location: nil) super(location: location) @term = term @body = body.dup.freeze end |
Instance Attribute Details
#body ⇒ Object (readonly)
41 42 43 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 41 def body @body end |
#term ⇒ Object (readonly)
38 39 40 |
# File 'lib/ruby/rego/ast/comprehension.rb', line 38 def term @term end |