Class: Pod::Source::HealthReporter::HealthReport
- Inherits:
-
Object
- Object
- Pod::Source::HealthReporter::HealthReport
- Defined in:
- lib/cocoapods-core/source/health_reporter.rb
Overview
Encapsulates the information about the state of a repo.
Private helpers collapse
-
#analyzed_paths ⇒ Array<Pathname>
The list of the analyzed paths.
-
#pods_by_error ⇒ Hash{ String => Hash }
The pods (the version grouped by name) grouped by an error message.
-
#pods_by_warning ⇒ Hash{ String => Hash }
The pods (the version grouped by name) grouped by a warning message.
-
#source ⇒ Source
readonly
The source analyzed.
Private helpers collapse
-
#add_message(type, message, spec_name, spec_version = nil) ⇒ void
Adds a message with the given type for the specification with the given name and version.
-
#initialize(source) ⇒ HealthReport
constructor
A new instance of HealthReport.
Constructor Details
#initialize(source) ⇒ HealthReport
Returns a new instance of HealthReport.
146 147 148 149 150 151 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 146 def initialize(source) @source = source @analyzed_paths = [] @pods_by_error = {} @pods_by_warning = {} end |
Instance Attribute Details
#analyzed_paths ⇒ Array<Pathname>
Returns The list of the analyzed paths.
155 156 157 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 155 def analyzed_paths @analyzed_paths end |
#pods_by_error ⇒ Hash{ String => Hash }
Returns The pods (the version grouped by name) grouped by an error message.
160 161 162 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 160 def pods_by_error @pods_by_error end |
#pods_by_warning ⇒ Hash{ String => Hash }
Returns The pods (the version grouped by name) grouped by a warning message.
165 166 167 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 165 def pods_by_warning @pods_by_warning end |
#source ⇒ Source (readonly)
Returns the source analyzed.
142 143 144 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 142 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.
184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/cocoapods-core/source/health_reporter.rb', line 184 def (type, , spec_name, spec_version = nil) if type == :error pods_by_error[] ||= {} pods_by_error[][spec_name] ||= [] pods_by_error[][spec_name] << spec_version else pods_by_warning[] ||= {} pods_by_warning[][spec_name] ||= [] pods_by_warning[][spec_name] << spec_version end end |