Class: Ruby::Rego::Memoization::Store
- Inherits:
-
Object
- Object
- Ruby::Rego::Memoization::Store
- Defined in:
- lib/ruby/rego/memoization.rb
Overview
Stack-based memoization store for nested scopes.
Instance Method Summary collapse
-
#context ⇒ Context
-
#initialize ⇒ Store
constructor
A new instance of Store.
-
#reset ⇒ void
Reset memoized data without mutation semantics.
-
#reset! ⇒ void
Reset memoized data for a new evaluation.
-
#with_context ⇒ Object
Run with a fresh memoization context.
Constructor Details
Instance Method Details
#context ⇒ Context
61 62 63 |
# File 'lib/ruby/rego/memoization.rb', line 61 def context @contexts.last end |
#reset ⇒ void
This method returns an undefined value.
Reset memoized data without mutation semantics.
46 47 48 |
# File 'lib/ruby/rego/memoization.rb', line 46 def reset reset! end |