123456789_123456789_123456789_123456789_123456789_

Exception: Rails::Command::CorrectableNameError

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, StandardError
Instance Chain:
self, DidYouMean::Correctable, StandardError
Inherits: StandardError
  • ::Object
Defined in: railties/lib/rails/command.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(message, name, alternatives) ⇒ CorrectableNameError

[ GitHub ]

  
# File 'railties/lib/rails/command.rb', line 20

def initialize(message, name, alternatives)
  @name = name
  @alternatives = alternatives
  super(message)
end

Instance Attribute Details

#name (readonly)

[ GitHub ]

  
# File 'railties/lib/rails/command.rb', line 18

attr_reader :name

Instance Method Details

#corrections

[ GitHub ]

  
# File 'railties/lib/rails/command.rb', line 29

def corrections
  @corrections ||= DidYouMean::SpellChecker.new(dictionary: @alternatives).correct(name)
end