Class: Prefab::Evaluation
- Inherits:
-
Object
- Object
- Prefab::Evaluation
- Defined in:
- lib/prefab/evaluation.rb
Overview
Records the result of evaluating a config’s criteria and forensics for reporting
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(config:, value:, value_index:, config_row_index:, context:, resolver:) ⇒ Evaluation
constructor
A new instance of Evaluation.
- #report_and_return(evaluation_summary_aggregator) ⇒ Object
- #reportable_value ⇒ Object
- #unwrapped_value ⇒ Object
Constructor Details
#initialize(config:, value:, value_index:, config_row_index:, context:, resolver:) ⇒ Evaluation
Returns a new instance of Evaluation.
8 9 10 11 12 13 14 15 |
# File 'lib/prefab/evaluation.rb', line 8 def initialize(config:, value:, value_index:, config_row_index:, context:, resolver:) @config = config @value = value @value_index = value_index @config_row_index = config_row_index @context = context @resolver = resolver end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/prefab/evaluation.rb', line 6 def value @value end |
Instance Method Details
#report_and_return(evaluation_summary_aggregator) ⇒ Object
25 26 27 28 29 |
# File 'lib/prefab/evaluation.rb', line 25 def report_and_return(evaluation_summary_aggregator) report(evaluation_summary_aggregator) unwrapped_value end |
#reportable_value ⇒ Object
21 22 23 |
# File 'lib/prefab/evaluation.rb', line 21 def reportable_value deepest_value.reportable_value end |
#unwrapped_value ⇒ Object
17 18 19 |
# File 'lib/prefab/evaluation.rb', line 17 def unwrapped_value deepest_value.unwrap end |