Class: Yardstick::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/yardstick/parser.rb

Overview

Parses files and strings using YARD

Class Method Summary collapse

Class Method Details

.parse_paths(paths) ⇒ Array<Document>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Measure files specified in the paths

Returns:

  • (Array<Document>)

    a collection of parsed documents


12
13
14
15
# File 'lib/yardstick/parser.rb', line 12

def self.parse_paths(paths)
  YARD.parse(paths, [], YARD::Logger::ERROR)
  documents
end

.parse_string(string) ⇒ Array<Document>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Measure string provided

Parameters:

  • string (#to_str)

    the string to measure

Returns:

  • (Array<Document>)

    a collection of parsed documents


26
27
28
29
# File 'lib/yardstick/parser.rb', line 26

def self.parse_string(string)
  YARD.parse_string(string.to_str)
  documents
end