lib/asker/data/world.rb in asker-tool-2.6.0 vs lib/asker/data/world.rb in asker-tool-2.7.0
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require_relative '../loader/image_url_loader'
+require_relative "../loader/image_url_loader"
class World
# TODO: change how World class works ?
attr_reader :concepts, :filenames, :contexts, :image_urls
@@ -35,11 +35,11 @@
input.each do |c|
next unless c.process
concepts[c.name] = c
filenames << c.filename
- contexts << c.context
+ contexts << c.context
end
filenames.uniq!
contexts.uniq!
[concepts, filenames, contexts]
end
@@ -50,10 +50,10 @@
threads = []
searchs = []
urls = {}
@concepts&.each_key { |key| searchs << key }
- @contexts.each { |filter| searchs << filter.join(' ').to_s }
+ @contexts.each { |filter| searchs << filter.join(" ").to_s }
searchs.each do |search|
threads << Thread.new { urls[search] = ImageUrlLoader.load(search) }
end
threads.each(&:join)
urls