module Replication::Modules::SemiConservative

Public Instance Methods

replicate(**options) click to toggle source
# File lib/replication/modules/semi_conservative.rb, line 17
def replicate(**options)
  strand_class.to_adapter.create!({
    name: options[:name],
    pairs: strand_attributes,
    origin_id: self.id,
    origin_type: self.class.to_s
  })
end
strand_attributes() click to toggle source
# 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) click to toggle source
# File lib/replication/modules/semi_conservative.rb, line 8
def unwound(**options)
  strand_class.new({
    name: options[:name],
    pairs: strand_attributes,
    origin_id: self.id,
    origin_type: self.class.to_s
  })
end