class TinymceSpellcheck::TinymceSpellcheck
Public Class Methods
new(options = {}, engine = nil)
click to toggle source
# File lib/tinymce_spellcheck/tinymce_spellcheck.rb, line 3 def initialize(options = {}, engine = nil) @@engines = [ :raspell ] unless engine engine = :raspell end raise Exception, "Unsupported engine" unless (engine && @@engines.include?(engine)) @engine = Engines.const_get(engine.to_s.classify).new(options) end
Public Instance Methods
check_words(lang, words)
click to toggle source
# File lib/tinymce_spellcheck/tinymce_spellcheck.rb, line 14 def check_words(lang, words) @engine.check_words(lang, words) end
get_suggestions(lang, word)
click to toggle source
# File lib/tinymce_spellcheck/tinymce_spellcheck.rb, line 18 def get_suggestions(lang, word) @engine.get_suggestions(lang, word) end