Sha256: 2201ba6fa9846447ca6d0edf3772d50b062d3903c91bfd93ef21abb97cacfbd6

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

# frozen_string_literal: true

require "active_record"
require_relative "snapcher/version"

module Snapcher
  class Error < StandardError; end
  # Your code goes here...

  class << self
    attr_accessor :column_name
    attr_writer :scanning_class

    def scanning_class
      # The scanning_class is set as String in the initializer. It can not be constantized during initialization and must
      # be constantized at runtime.
      @scanning_class = @scanning_class.safe_constantize if @scanning_class.is_a?(String)
      @scanning_class ||= Snapcher::Scanning
    end
  end
end

require "snapcher/junker"

ActiveSupport.on_load :active_record do
  require "snapcher/scanning"
  include Snapcher::Junker
end

require "snapcher/railtie"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
snapcher-0.1.0 lib/snapcher.rb