lib/active_set/processors/base_processor.rb in activeset-0.3.0 vs lib/active_set/processors/base_processor.rb in activeset-0.3.1
- old
+ new
@@ -1,19 +1,22 @@
# frozen_string_literal: true
require 'patches/core_ext/hash/flatten_keys'
+require_relative '../instructions/base'
-class BaseProcessor
- def self.queue_adapter(adapter)
- @adapters ||= []
- @adapters |= [adapter]
- end
+class ActiveSet
+ class BaseProcessor
+ def self.queue_adapter(adapter)
+ @adapters ||= []
+ @adapters |= [adapter]
+ end
- def initialize(set, structure)
- @set = set
- @structure = structure.flatten_keys
- end
+ def initialize(set, instructions)
+ @set = set
+ @instructions = Instructions.new(instructions)
+ end
- def adapters
- self.class.instance_variable_get(:@adapters)
+ def adapters
+ self.class.instance_variable_get(:@adapters)
+ end
end
end