class Pod::Source::HealthReporter::HealthReport

Encapsulates the information about the state of a repo.

Attributes

analyzed_paths[RW]

@return [Array<Pathname>] The list of the analyzed paths.

pods_by_error[RW]

@return [Hash{ String => Hash }] The pods (the version grouped by

name) grouped by an error message.
pods_by_warning[RW]

@return [Hash{ String => Hash }] The pods (the version grouped by

name) grouped by a warning message.
source[R]

@return [Source] the source analyzed.

Public Class Methods

new(source) click to toggle source

@param [Source] @see source.

# File lib/cocoapods-core/source/health_reporter.rb, line 143
def initialize(source)
  @source = source
  @analyzed_paths = []
  @pods_by_error = {}
  @pods_by_warning = {}
end

Public Instance Methods

add_message(type, message, spec_name, spec_version = nil) click to toggle source

Adds a message with the given type for the specification with the given name and version.

@param [Symbol] type

The type of message. Either `:error` or `:warning`.

@param [String] message

The contents of the message.

@param [String] spec_name

The name of the Pod.

@param [String] spec_version

The version of the specification.

@return [void]

# File lib/cocoapods-core/source/health_reporter.rb, line 181
def add_message(type, message, spec_name, spec_version = nil)
  pods = send(:"pods_by_#{type}")
  pods[message] ||= {}
  pods[message][spec_name] ||= []
  pods[message][spec_name] << spec_version
end