Class: Gem::UnknownCommandSpellChecker
- Inherits:
 - 
      Object
      
        
- Object
 - Gem::UnknownCommandSpellChecker
 
 
- Defined in:
 - lib/rubygems/unknown_command_spell_checker.rb
 
Instance Attribute Summary collapse
- 
  
    
      #error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute error.
 
Instance Method Summary collapse
- #corrections ⇒ Object
 - 
  
    
      #initialize(error)  ⇒ UnknownCommandSpellChecker 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of UnknownCommandSpellChecker.
 
Constructor Details
#initialize(error) ⇒ UnknownCommandSpellChecker
Returns a new instance of UnknownCommandSpellChecker.
      6 7 8  | 
    
      # File 'lib/rubygems/unknown_command_spell_checker.rb', line 6 def initialize(error) @error = error end  | 
  
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
      4 5 6  | 
    
      # File 'lib/rubygems/unknown_command_spell_checker.rb', line 4 def error @error end  | 
  
Instance Method Details
#corrections ⇒ Object
      10 11 12 13  | 
    
      # File 'lib/rubygems/unknown_command_spell_checker.rb', line 10 def corrections @corrections ||= spell_checker.correct(error.unknown_command).map(&:inspect) end  |