123456789_123456789_123456789_123456789_123456789_

Class: DidYouMean::DeprecatedMapping

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/did_you_mean.rb

Overview

TODO: Remove on the 3.4 development start:

Instance Method Summary

Instance Method Details

#[]=(key, value)

[ GitHub ]

  
# File 'lib/did_you_mean.rb', line 118

def []=(key, value)
  warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \
       "Please call `DidYouMean.correct_error(#{key.to_s}, #{value.to_s})' instead."

  DidYouMean.correct_error(key, value)
end

#merge!(hash)

[ GitHub ]

  
# File 'lib/did_you_mean.rb', line 125

def merge!(hash)
  warn "Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. " \
       "Please call `DidYouMean.correct_error(error_name, spell_checker)' instead."

  hash.each do |error_class, spell_checker|
    DidYouMean.correct_error(error_class, spell_checker)
  end
end