class Yardstick::Parser

Parses files and strings using YARD

def self.documents

Other tags:
    Api: - private

Returns:
  • (Yardstick::DocumentSet) -
def self.documents
  method_objects.reduce(DocumentSet.new) do |set, method_object|
    set << Document.new(method_object.docstring)
    set
  end
end

def self.method_objects

Other tags:
    Api: - private

Returns:
  • (Array) -
def self.method_objects
  YARD::Registry.all(:method).select(&:file).select(&:line).sort_by do |method_object|
    [method_object.file, method_object.line]
  end
ensure
  YARD::Registry.clear
end

def self.parse_paths(paths)

Other tags:
    Api: - private

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

def self.parse_string(string)

Other tags:
    Api: - private

Returns:
  • (Array) -

Parameters:
  • string (#to_str) --
def self.parse_string(string)
  YARD.parse_string(string.to_str)
  documents
end