Method: RubyPitaya::ParameterMissing::Correction#corrections
- Defined in:
- lib/rubypitaya/core/parameters.rb
#corrections ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rubypitaya/core/parameters.rb', line 26 def corrections if @error.param && @error.keys maybe_these = @error.keys maybe_these.sort_by { |n| DidYouMean::Jaro.distance(@error.param.to_s, n) }.reverse.first(4) else [] end end |