Sha256: c4e3e4a2f444aa29e9b7030eceac2b2bd2302202e830fa77640b98857cd35774

Contents?: true

Size: 479 Bytes

Versions: 7

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Exceptions
  module ActiveRecord
    class UninitializedConstant < Base
      private

      def unknown_from_exception
        exception.to_s.split.last
      end

      def corrected_cmd
        @corrected_cmd ||= last_cmd.gsub(unknown_from_exception, corrected_word)
      end

      def dictionary
        @ar_models_dictionary ||= store.transaction { |s| s["active_record_models"] }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pry-byetypo-1.3.5 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.3.4 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.3.3 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.3.2 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.3.1 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.3.0 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb
pry-byetypo-1.2.0 lib/pry-byetypo/exceptions/active_record/uninitialized_constant.rb