# module DidYouMean::Experimental::InitializerNameCorrection

### Public Instance Methods

method_added(name) click to toggle source
Calls superclass method

    # File lib/did_you_mean/experimental/initializer_name_correction.rb, line 8
    def method_added(name)
      super

      distance = Levenshtein.distance(name.to_s, 'initialize')
      if distance != 0 && distance <= 2
        warn "warning: #{name} might be misspelled, perhaps you meant initialize?"
      end
    end