lib/cotcube-bardata/eods.rb in cotcube-bardata-0.1.16 vs lib/cotcube-bardata/eods.rb in cotcube-bardata-0.1.17

- old
+ new

@@ -76,15 +76,17 @@ process_date_for_id = lambda do |d, i| # l_sym = symbols.select { |s| s[:id] == i }.first # l_symbol = l_sym[:symbol] id_path = id_path_get.call(i) data_file = "#{id_path}/#{d}.csv" + current_sym = Cotcube::Helpers.get_id_set(id: i, config: config) raise "No data found for requested :id (#{id_path} does not exist)" unless Dir.exist?(id_path) unless File.exist?(data_file) unless quiet - puts 'WARNING: No data found for requested id/symbol'\ - " #{id}/#{symbol} in #{id_path} for #{d}.".colorize(:light_yellow) + puts 'WARNING: No data found for requested symbol'\ + " #{current_sym[:symbol]} in #{id_path} for #{d}.".colorize(:light_yellow) + end return [] end data = CSV.read(data_file, headers: %i[contract date open high low close volume oi]).map do |row| row = row.to_h