Class: GithubFormatter
- Inherits:
-
RuboCop::Formatter::BaseFormatter
- Object
- RuboCop::Formatter::BaseFormatter
- GithubFormatter
- Defined in:
- lib/ducalis/github_formatter.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
Instance Method Summary collapse
- #file_finished(_file, offenses) ⇒ Object
- #finished(_inspected_files) ⇒ Object
- #started(_target_files) ⇒ Object
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
4 5 6 |
# File 'lib/ducalis/github_formatter.rb', line 4 def all @all end |
Instance Method Details
#file_finished(_file, offenses) ⇒ Object
10 11 12 13 |
# File 'lib/ducalis/github_formatter.rb', line 10 def file_finished(_file, offenses) print '.' @all << offenses unless offenses.empty? end |
#finished(_inspected_files) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/ducalis/github_formatter.rb', line 15 def finished(_inspected_files) print "\n" Ducalis::Commentators::Github.new( GitAccess.instance.repo, GitAccess.instance.id ).call(@all.flatten) end |
#started(_target_files) ⇒ Object
6 7 8 |
# File 'lib/ducalis/github_formatter.rb', line 6 def started(_target_files) @all = [] end |