lib/yard/spellcheck/checker.rb
#
# Spellchecks a YARD Documentation object.
#
# @param [YARD::CodeObject::Base] obj
#   The YARD Documentation object.
#
# @param [FFI::Hunspell::Dictionary] dict
#   The dictionary to spellcheck against.
#
# @yield [element, typos]
#   The given block will be passed each element and any typos found.
#
# @yieldparam [YARD::Docstring, YARD::Tag] element
#   An element from the YARD Documentation.
#
# @yieldparam [Set<String>] typos
#   Any typos found within the element.
#
Spellchecks a YARD Documentation object.
Spellchecks a YARD Documentation object .
def spellcheck_object(obj,dict)
        docstring = obj.docstring
        unless (typos = spellcheck(docstring,dict)).empty?
          yield docstring, typos
        end
        docstring.tags.each do |tag|
          next if SKIP_TAGS.include?(tag.tag_name)
          if tag.text
            unless (typos = spellcheck(tag.text,dict)).empty?
              yield tag, typos
            end
          end
        end
      end
def spellcheck_object ( obj , dict ) docstring = obj . docstring unless ( typos = spellcheck ( docstring , dict ) ) . empty? yield docstring , typos end docstring . tags . each do | tag | next if SKIP_TAGS . include? ( tag . tag_name ) if tag . text unless ( typos = spellcheck ( tag . text , dict ) ) . empty? yield tag , typos end end end end
Spellchecks a YARD Documentation object.
Spellchecks a YARD Documentation object .
obj
dict
typos Any typos found within the element.
typos Any typos found within the element .
]
The given block will be passed each element and any typos found.
The given block will be passed each element and any typos found .