Exception: Rails::Command::CorrectableNameError
- Inherits:
-
StandardError
- Object
- StandardError
- Rails::Command::CorrectableNameError
- Includes:
- DidYouMean::Correctable
- Defined in:
- lib/rails/command.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #corrections ⇒ Object
- #detailed_message ⇒ Object
-
#initialize(message, name, alternatives) ⇒ CorrectableNameError
constructor
A new instance of CorrectableNameError.
Constructor Details
#initialize(message, name, alternatives) ⇒ CorrectableNameError
Returns a new instance of CorrectableNameError.
20 21 22 23 24 |
# File 'lib/rails/command.rb', line 20 def initialize(, name, alternatives) @name = name @alternatives = alternatives super() end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/rails/command.rb', line 18 def name @name end |
Instance Method Details
#corrections ⇒ Object
35 36 37 |
# File 'lib/rails/command.rb', line 35 def corrections @corrections ||= DidYouMean::SpellChecker.new(dictionary: @alternatives).correct(name) end |
#detailed_message ⇒ Object
27 28 29 |
# File 'lib/rails/command.rb', line 27 def (...) end |