123456789_123456789_123456789_123456789_123456789_

Class: Bundler::Thor::UndefinedCommandError::SpellChecker

Relationships & Source Files
Inherits: Object
Defined in: lib/bundler/vendor/thor/lib/thor/error.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(error) ⇒ SpellChecker

[ GitHub ]

  
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 31

def initialize(error)
  @error = error
end

Instance Attribute Details

#error (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 29

attr_reader :error

Instance Method Details

#corrections

[ GitHub ]

  
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 35

def corrections
  @corrections ||= spell_checker.correct(error.command).map(&:inspect)
end

#spell_checker

[ GitHub ]

  
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 39

def spell_checker
  NoKwargSpellChecker.new(error.all_commands)
end