Sha256: a9db29cee96c03dc0389ceeac5be786be2a17018be6bb0b6f828fc5f6aec90ce

Contents?: true

Size: 613 Bytes

Versions: 1

Compression:

Stored size: 613 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module DataIntegrity
    # Checking cop base class
    class Cop
      attr_reader :model
      delegate :connection, to: :model

      def initialize(model)
        @model = model
      end

      def name
        self.class.name.gsub('ActiveRecord::DataIntegrity::', '').gsub('::', '/')
      end

      def log(msg)
        ActiveRecord::DataIntegrity::Collector.log(self, msg)
      end

      def progress(subresult, false_char = 'E')
        ActiveRecord::DataIntegrity::Collector.progress(self, subresult ? '.' : false_char)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-data_integrity-0.1.0 lib/active_record/data_integrity/cop/cop.rb