lib/replication/modules/semi_conservative.rb in replication-0.1.1 vs lib/replication/modules/semi_conservative.rb in replication-0.1.2
- old
+ new
@@ -1,35 +1,26 @@
module Replication
module Modules
module SemiConservative
- def self.extended(model_class)
- model_class.class_eval do
- include Model
- end
+ def unwound(**options)
+ strand_class.new({
+ name: options[:name],
+ pairs: strand_attributes,
+ origin: self
+ })
end
- module Model
+ def replicate(**options)
+ strand_class.to_adapter.create!({
+ name: options[:name],
+ pairs: strand_attributes,
+ origin: self
+ })
+ end
- def unwound(**options)
- strand_class.new({
- name: options[:name],
- pairs: strand_attributes,
- origin: self
- })
- end
-
- def replicate(**options)
- strand_class.to_adapter.create!({
- name: options[:name],
- pairs: strand_attributes,
- origin: self
- })
- end
-
- def strand_attributes
- _strand_attributes.except(*replication_config.except)
- end
+ def strand_attributes
+ _strand_attributes.except(*replication_config.except)
end
end
end
end