class ActionSuggester

Public Class Methods

new(dictionary) click to toggle source
# File lib/action_suggester.rb, line 4
def initialize(dictionary)
        @dictionary = dictionary
end

Public Instance Methods

check(word) click to toggle source
# File lib/action_suggester.rb, line 8
def check(word)
        spellchecker.correct(word)
end

Private Instance Methods

spellchecker() click to toggle source
# File lib/action_suggester.rb, line 14
def spellchecker
        @spellchecker ||= DidYouMean::SpellChecker.new(dictionary: @dictionary)
end