Class: Inferno::DSL::FHIREvaluation::EvaluationContext
- Inherits:
-
Object
- Object
- Inferno::DSL::FHIREvaluation::EvaluationContext
- Defined in:
- lib/inferno/dsl/fhir_evaluation/evaluation_context.rb
Overview
EvaluationContext is a wrapper class around the concepts needed to perform an evaluation: - The IG used as the basis for evaluation - The data being evaluated - A summary/characterization of the data - Evaluation results - A Validator instance, configured to point to the given IG
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#ig ⇒ Object
readonly
Returns the value of attribute ig.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#validator ⇒ Object
readonly
Returns the value of attribute validator.
Instance Method Summary collapse
-
#add_result(result) ⇒ Object
-
#initialize(ig, data, config, validator) ⇒ EvaluationContext
constructor
A new instance of EvaluationContext.
Constructor Details
#initialize(ig, data, config, validator) ⇒ EvaluationContext
Returns a new instance of EvaluationContext.
13 14 15 16 17 18 19 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 13 def initialize(ig, data, config, validator) @ig = ig @data = data @results = [] @config = config @validator = validator end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 11 def config @config end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 11 def data @data end |
#ig ⇒ Object (readonly)
Returns the value of attribute ig.
11 12 13 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 11 def ig @ig end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
11 12 13 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 11 def results @results end |
#validator ⇒ Object (readonly)
Returns the value of attribute validator.
11 12 13 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 11 def validator @validator end |
Instance Method Details
#add_result(result) ⇒ Object
21 22 23 |
# File 'lib/inferno/dsl/fhir_evaluation/evaluation_context.rb', line 21 def add_result(result) results.push result end |