Class: Pod::Source::HealthReporter::HealthReport

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-core/source/health_reporter.rb

Overview

Encapsulates the information about the state of a repo.

Private helpers collapse

Private helpers collapse

Constructor Details

#initialize(source) ⇒ HealthReport



143
144
145
146
147
148
# File 'lib/cocoapods-core/source/health_reporter.rb', line 143

def initialize(source)
  @source = source
  @analyzed_paths = []
  @pods_by_error = {}
  @pods_by_warning = {}
end

Instance Attribute Details

#analyzed_pathsArray<Pathname>



152
153
154
# File 'lib/cocoapods-core/source/health_reporter.rb', line 152

def analyzed_paths
  @analyzed_paths
end

#pods_by_errorHash{ String => Hash }



157
158
159
# File 'lib/cocoapods-core/source/health_reporter.rb', line 157

def pods_by_error
  @pods_by_error
end

#pods_by_warningHash{ String => Hash }



162
163
164
# File 'lib/cocoapods-core/source/health_reporter.rb', line 162

def pods_by_warning
  @pods_by_warning
end

#sourceSource (readonly)



139
140
141
# File 'lib/cocoapods-core/source/health_reporter.rb', line 139

def source
  @source
end

Instance Method Details

#add_message(type, message, spec_name, spec_version = nil) ⇒ void

This method returns an undefined value.

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



181
182
183
184
185
186
# 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