class Bundler::Thor::UndefinedCommandError::SpellChecker - bundler: Ruby Standard Library Documentation

# class Bundler::Thor::UndefinedCommandError::SpellChecker

### Attributes

error[R]

### Public Class Methods

new(error) click to toggle source

    # File bundler/vendor/thor/lib/thor/error.rb, line 28
    def initialize(error)
      @error = error
    end

### Public Instance Methods

corrections() click to toggle source

    # File bundler/vendor/thor/lib/thor/error.rb, line 32
    def corrections
      @corrections ||= spell_checker.correct(error.command).map(&:inspect)
    end

spell_checker() click to toggle source

    # File bundler/vendor/thor/lib/thor/error.rb, line 36
    def spell_checker
      DidYouMean::SpellChecker.new(dictionary: error.all_commands)
    end