Class: Policial::StyleChecker
- Inherits:
-
Object
- Object
- Policial::StyleChecker
- Defined in:
- lib/policial/style_checker.rb
Overview
Public: Filters files to reviewable subset, builds style guide based on file extension and delegates to style guide for line violations.
Instance Method Summary collapse
-
#initialize(pull_request, options = {}) ⇒ StyleChecker
constructor
A new instance of StyleChecker.
- #violations ⇒ Object
Constructor Details
#initialize(pull_request, options = {}) ⇒ StyleChecker
Returns a new instance of StyleChecker.
7 8 9 10 11 |
# File 'lib/policial/style_checker.rb', line 7 def initialize(pull_request, = {}) @pull_request = pull_request @style_guides = {} @options = end |
Instance Method Details
#violations ⇒ Object
13 14 15 |
# File 'lib/policial/style_checker.rb', line 13 def violations @violations ||= violations_in_checked_files.select(&:on_changed_line?) end |