Module: Replication::Modules::SemiConservative
- Defined in:
- lib/replication/modules/semi_conservative.rb
Instance Method Summary collapse
Instance Method Details
#replicate(**options) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/replication/modules/semi_conservative.rb', line 17 def replicate(**) strand_class.to_adapter.create!({ name: [:name], pairs: strand_attributes, origin_id: self.id, origin_type: self.class.to_s }) end |
#strand_attributes ⇒ Object
26 27 28 29 30 |
# File 'lib/replication/modules/semi_conservative.rb', line 26 def strand_attributes @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 |
#unwound(**options) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/replication/modules/semi_conservative.rb', line 8 def unwound(**) strand_class.new({ name: [:name], pairs: strand_attributes, origin_id: self.id, origin_type: self.class.to_s }) end |