Class: Jac::Configuration::EvaluationContext
- Inherits:
-
Object
- Object
- Jac::Configuration::EvaluationContext
- Defined in:
- lib/jac/configuration.rb
Overview
Proxy class for getting actual values when referencing profile inside evaluated expressions
Instance Method Summary collapse
-
#initialize(evaluator) ⇒ EvaluationContext
constructor
A new instance of EvaluationContext.
- #method_missing(meth, *args, &block) ⇒ Object
- #respond_to_missing?(_meth, _args, &_block) ⇒ Boolean
Constructor Details
#initialize(evaluator) ⇒ EvaluationContext
Returns a new instance of EvaluationContext.
294 295 296 |
# File 'lib/jac/configuration.rb', line 294 def initialize(evaluator) @evaluator = evaluator end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
302 303 304 305 306 |
# File 'lib/jac/configuration.rb', line 302 def method_missing(meth, *args, &block) # rubocop ispection hack return super unless respond_to_missing?(meth, args, &block) @evaluator.evaluate(meth.to_s) end |
Instance Method Details
#respond_to_missing?(_meth, _args, &_block) ⇒ Boolean
298 299 300 |
# File 'lib/jac/configuration.rb', line 298 def respond_to_missing?(_meth, _args, &_block) true end |