app/models/manager_refresh/inventory_collection.rb
# Processes passed strategy, modifies :data_collection_finalized and :saved attributes for db only strategies
#
# @param strategy_name [Symbol] Passed saver strategy
# @return [Symbol] Returns back the passed strategy if supported, or raises exception
Processes passed strategy, modifies :data_collection_finalized and :saved attributes for db only strategies
Processes passed strategy modifies : data_collection_finalized and : saved attributes for db only strategies
def process_strategy(strategy_name)
      self.data_collection_finalized = false
      return unless strategy_name
      case strategy_name
      when :local_db_cache_all
        self.data_collection_finalized = true
        self.saved = true
      when :local_db_find_references
        self.saved = true
      when :local_db_find_missing_references
      else
        raise "Unknown InventoryCollection strategy: :#{strategy_name}, allowed strategies are :local_db_cache_all, "\
              ":local_db_find_references and :local_db_find_missing_references."
      end
      strategy_name
    end
def process_strategy ( strategy_name ) self . data_collection_finalized = false return unless strategy_name case strategy_name when :local_db_cache_all self . data_collection_finalized = true self . saved = true when :local_db_find_references self . saved = true when :local_db_find_missing_references else raise "Unknown InventoryCollection strategy: :#{strategy_name}, allowed strategies are :local_db_cache_all, " ":local_db_find_references and :local_db_find_missing_references." end strategy_name end
Processes passed strategy, modifies :data_collection_finalized and :saved attributes for db only strategies
Processes passed strategy modifies : data_collection_finalized and : saved attributes for db only strategies
Returns back the passed strategy if supported, or raises exception
Returns back the passed strategy if supported or raises exception
Symbol
strategy_name
Passed saver strategy
Passed saver strategy