Sha256: 30d9f8fa8aeb001992c1843b6d572fa68bbc40560377e982d889a12a2cc58336

Contents?: true

Size: 720 Bytes

Versions: 2

Compression:

Stored size: 720 Bytes

Contents

module Replication
  module Modules
    module SemiConservative

      def self.extended(model_class)
        model_class.class_eval do
          include Model
        end
      end

      module Model

        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
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
replication-0.1.1 lib/replication/modules/semi_conservative.rb
replication-0.1.0 lib/replication/modules/semi_conservative.rb