lib/materialize/base_builder.rb in materialize-0.2.3 vs lib/materialize/base_builder.rb in materialize-0.2.4
- old
+ new
@@ -1,24 +1,15 @@
module Materialize
class BaseBuilder
+ extend Concurrent
class << self
def build(data, repo, options)
entity_class.new(data)
end
def build_all(data, repo, options)
entity_class.wrap(data)
- end
-
- def concurrent(*lambdas)
- threads = []
- lambdas.each do |l|
- threads << Thread.new do
- l.()
- end
- end
- threads.each(&:join)
end
def entity_class
"Entities::#{entity_base_class_name}".split('::').reduce(Module, :const_get)
end