Class: DashOverlord::UseCases::V1::ChartConfigs::CacheAnswerValues::BuildCache

Inherits:
Base
  • Object
show all
Defined in:
lib/dash_overlord/use_cases/v1/chart_configs/cache_answer_values/build_cache.rb

Constant Summary

Constants inherited from Base

Base::AbortError

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

context_reader, #final, #initialize, perform, target, #target_valid?

Constructor Details

This class inherits a constructor from DashOverlord::UseCases::Base

Instance Method Details

#performObject



10
11
12
13
14
15
16
17
# File 'lib/dash_overlord/use_cases/v1/chart_configs/cache_answer_values/build_cache.rb', line 10

def perform
  chart_config.cached_answer_values =
    unique_answer_values.map { |key, value|
      { label: key, value: value }
    }

  chart_config.cached_answer_updated_at = cached_answer_updated_at
end