Class: Jets::Command::Base::CorrectableError
- Includes:
- DidYouMean::Correctable
- Defined in:
- lib/jets/command/base.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #corrections ⇒ Object
-
#initialize(message, key, options) ⇒ CorrectableError
constructor
A new instance of CorrectableError.
Constructor Details
#initialize(message, key, options) ⇒ CorrectableError
Returns a new instance of CorrectableError.
22 23 24 25 26 |
# File 'lib/jets/command/base.rb', line 22 def initialize(, key, ) @key = key @options = super() end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
20 21 22 |
# File 'lib/jets/command/base.rb', line 20 def key @key end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
20 21 22 |
# File 'lib/jets/command/base.rb', line 20 def @options end |
Instance Method Details
#corrections ⇒ Object
31 32 33 |
# File 'lib/jets/command/base.rb', line 31 def corrections @corrections ||= DidYouMean::SpellChecker.new(dictionary: ).correct(key) end |