lib/yard/spellcheck/printer.rb
#
# Prints typos in a YARD Documentation element.
#
# @param [YARD::Docstring, YARD::Tags::Tag] element
#   The element that the typos occurred in.
#
# @param [Set<String>] typos
#   The typos that were found in the element.
#
Prints typos in a YARD Documentation element.
Prints typos in a YARD Documentation element .
def print_typos(element,typos)
        case element
        when YARD::Docstring
          line = if element.line_range then element.line_range.first
                 else                       1
                 end
          puts "Typos in #{element.object} (#{element.object.file}:#{line})"
          print_text line, element, typos
        when YARD::Tags::Tag
          puts "Typos in @#{element.tag_name} #{element.name} (#{element.object.file}:#{element.object.line})"
          print_text element.object.line, element.text, typos
        end
      end
def print_typos ( element , typos ) case element when YARD :: Docstring line = if element . line_range then element . line_range . first else 1 end puts "Typos in #{element.object} (#{element.object.file}:#{line})" print_text line , element , typos when YARD :: Tags :: Tag puts "Typos in @#{element.tag_name} #{element.name} (#{element.object.file}:#{element.object.line})" print_text element . object . line , element . text , typos end end
Prints typos in a YARD Documentation element.
Prints typos in a YARD Documentation element .
element
typos
typos The typos that were found in the element.
typos The typos that were found in the element .