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:) ⇒ Evaluation
constructor
A new instance of Evaluation.
- #report_and_return(evaluation_summary_aggregator) ⇒ Object
- #unwrapped_value ⇒ Object
Constructor Details
#initialize(config:, value:, value_index:, config_row_index:, context:) ⇒ Evaluation
Returns a new instance of Evaluation.
8 9 10 11 12 13 14 |
# File 'lib/prefab/evaluation.rb', line 8 def initialize(config:, value:, value_index:, config_row_index:, context:) @config = config @value = value @value_index = value_index @config_row_index = config_row_index @context = context 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
20 21 22 23 24 |
# File 'lib/prefab/evaluation.rb', line 20 def report_and_return(evaluation_summary_aggregator) report(evaluation_summary_aggregator) unwrapped_value end |
#unwrapped_value ⇒ Object
16 17 18 |
# File 'lib/prefab/evaluation.rb', line 16 def unwrapped_value deepest_value.unwrap end |