lib/bcdd/context/success.rb in bcdd-result-1.0.0 vs lib/bcdd/context/success.rb in bcdd-result-1.1.0
- old
+ new
@@ -6,16 +6,16 @@
end
class Success < self
include ::BCDD::Success
- FetchValues = ->(acc_values, keys) do
- fetched_values = acc_values.fetch_values(*keys)
+ FetchValues = ->(memo_values, keys) do
+ fetched_values = memo_values.fetch_values(*keys)
keys.zip(fetched_values).to_h
rescue ::KeyError => e
- message = "#{e.message}. Available to expose: #{acc_values.keys.map(&:inspect).join(', ')}"
+ message = "#{e.message}. Available to expose: #{memo_values.keys.map(&:inspect).join(', ')}"
raise Error::InvalidExposure, message
end
def and_expose(type, keys, terminal: true)
@@ -23,12 +23,12 @@
raise ::ArgumentError, 'keys must be an Array of Symbols'
end
EventLogs.tracking.reset_and_then!
- acc_values = acc.merge(value)
+ memo_values = memo.merge(value)
- value_to_expose = FetchValues.call(acc_values, keys)
+ value_to_expose = FetchValues.call(memo_values, keys)
expectations = type_checker.expectations
self.class.new(type: type, value: value_to_expose, source: source, terminal: terminal, expectations: expectations)
end