Encapsulates the information about the state of a repo.
Object
source
initialize
analyzed_paths
pods_by_error
pods_by_warning
add_message
source #=> Source
Source
The source analyzed.
initialize(source) #=> HealthReport
Source
@see
Source.
HealthReport
A new instance of HealthReport
145 def initialize(source)
146 @source = source
147 @analyzed_paths = []
148 @pods_by_error = {}
149 @pods_by_warning = {}
150 end
analyzed_paths #=> Array<Pathname>
Array
The list of the analyzed paths.
analyzed_paths=(value) #=> Array<Pathname>
Array
The list of the analyzed paths.
pods_by_error #=> Hash{ String => Hash }
Hash{ String => Hash }
The pods (the version grouped by name) grouped by an error message.
pods_by_error=(value) #=> Hash{ String => Hash }
Hash{ String => Hash }
The pods (the version grouped by name) grouped by an error message.
pods_by_warning #=> Hash{ String => Hash }
Hash{ String => Hash }
The pods (the version grouped by name) grouped by a warning message.
pods_by_warning=(value) #=> Hash{ String => Hash }
Hash{ String => Hash }
The pods (the version grouped by name) grouped by a warning message.
add_message(type, message, spec_name, spec_version = nil) #=> void
Symbol
type
The type of message. Either :error
or :warning
.
String
message
The contents of the message.
String
spec_name
The name of the Pod.
String
spec_version
The version of the specification.
void
183 def add_message(type, message, spec_name, spec_version = nil)
184 if type == :error
185 pods_by_error[message] ||= {}
186 pods_by_error[message][spec_name] ||= []
187 pods_by_error[message][spec_name] << spec_version
188 else
189 pods_by_warning[message] ||= {}
190 pods_by_warning[message][spec_name] ||= []
191 pods_by_warning[message][spec_name] << spec_version
192 end
193 end