class Fasterer::Github::OutputComposer
Constants
- CONFIG_FILE_NAME
- SPEEDUPS_KEY
Attributes
ignored_offences[RW]
repo_name[RW]
repo_owner[RW]
Public Class Methods
new(owner, repo, ignored_offences)
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 8 def initialize(owner, repo, ignored_offences) @repo_owner = owner @repo_name = repo @ignored_offences = ignored_offences end
Public Instance Methods
add_api_errors(new_api_errors)
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 26 def add_api_errors(new_api_errors) new_api_errors.each { |e| api_errors << e } end
add_errors(path)
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 22 def add_errors(path) errors << { path: path } end
add_offences(offences, path)
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 14 def add_offences(offences, path) offences.each do |offence_name, lines| details = { path: path, lines: lines } next if ignored_offences.include?(offence_name) (fasterer_offences[offence_name] ||= []) << details end end
result()
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 30 def result { repo_owner: repo_owner, repo_name: repo_name, fasterer_offences: fasterer_offences, errors: errors, api_errors: api_errors } end
Private Instance Methods
api_errors()
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 52 def api_errors @api_errors ||= [] end
errors()
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 48 def errors @errors ||= [] end
fasterer_offences()
click to toggle source
# File lib/fasterer/github/output_composer.rb, line 44 def fasterer_offences @fasterer_offenses ||= {} end