Class: AlfonsoX::SpellChecker::Dictionary::Default
- Inherits:
-
Object
- Object
- AlfonsoX::SpellChecker::Dictionary::Default
- Defined in:
- lib/alfonsox/spellchecker/dictionary/default.rb
Overview
Default dictionary loader
Constant Summary collapse
- KEYWORDS =
Ruby keywords
%w[ ENCODING LINE FILE BEGIN END alias and begin break case class def defined? do else elsif end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield ].freeze
- OTHERS =
Other common but erroneous words in the Ruby-development world
%w[ asc autorun autotest bigint config const cov datetime desc dir env formatter klass rb hunspell mixin param sym rubymine simplecov unshift xml yml ].freeze
Instance Method Summary collapse
-
#initialize ⇒ Default
constructor
Initialize this default dictionary for Ruby code.
-
#word_present?(word) ⇒ Boolean
Check if a word is present in the dictionary.
Constructor Details
Instance Method Details
#word_present?(word) ⇒ Boolean
Check if a word is present in the dictionary.
93 94 95 |
# File 'lib/alfonsox/spellchecker/dictionary/default.rb', line 93 def word_present?(word) @words.include?(word.downcase) end |