Module: Ruby::Rego::EnvironmentOverrides
- Included in:
- Environment
- Defined in:
- lib/ruby/rego/environment/overrides.rb
Overview
Provides temporary input/data overrides for the environment.
Constant Summary collapse
- UNSET =
Object.new.freeze
Instance Method Summary collapse
Instance Method Details
#with_overrides(input: UNSET, data: UNSET) {|environment| ... } ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby/rego/environment/overrides.rb', line 15 def with_overrides(input: UNSET, data: UNSET) original = [@input, @data] memoization.with_context do apply_overrides(input, data) yield self end ensure @input, @data = original end |