lib/replication/process.rb in replication-0.2.0 vs lib/replication/process.rb in replication-0.3.0

- old
+ new

@@ -1,23 +1,23 @@ module Replication module Process def self.extended(model_class) model_class.class_eval do - @@replication_config = Class.new(Config).new(self) include Model end end # Include or extend it. We work with both. def self.included(model_class) model_class.extend self end def can_replicate(pairs_method = :attributes, **options) + @@replication_config = Class.new(Config).new(self) default_options = Replication.defaults modules = [:semi_conservative] # required module - modules.concat(Array(options.delete(:with))) + modules.concat([].push(options.delete(:with)).flatten).compact! @@replication_config.pairs_method = pairs_method @@replication_config.set default_options.merge(options) @@replication_config.with modules end