lib/replication/modules/semi_conservative.rb in replication-0.1.2 vs lib/replication/modules/semi_conservative.rb in replication-0.2.0
- old
+ new
@@ -1,5 +1,8 @@
+require 'active_support/core_ext/hash/except'
+require 'active_support/core_ext/hash/slice'
+
module Replication
module Modules
module SemiConservative
def unwound(**options)
@@ -17,10 +20,12 @@
origin: self
})
end
def strand_attributes
- _strand_attributes.except(*replication_config.except)
+ @strand_attributes = _strand_attributes
+ @strand_attributes = @strand_attributes.slice(*replication_config.only) unless replication_config.only.empty?
+ @strand_attributes = @strand_attributes.except(*replication_config.except) unless replication_config.except.empty?
end
end
end
end