Class: Ruby::Rego::AST::WithModifier

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby/rego/ast/query.rb

Overview

Represents a with modifier.

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s

Constructor Details

#initialize(target:, value:, location: nil) ⇒ WithModifier

Returns a new instance of WithModifier.

Parameters:

  • target (Object)
  • value (Object)
  • location (Location, nil) (defaults to: nil)


49
50
51
52
53
# File 'lib/ruby/rego/ast/query.rb', line 49

def initialize(target:, value:, location: nil)
  super(location: location)
  @target = target
  @value = value
end

Instance Attribute Details

#targetObject (readonly)

Returns:

  • (Object)


56
57
58
# File 'lib/ruby/rego/ast/query.rb', line 56

def target
  @target
end

#valueObject (readonly)

Returns:

  • (Object)


59
60
61
# File 'lib/ruby/rego/ast/query.rb', line 59

def value
  @value
end