Class: Policial::StyleGuides::Base
- Inherits:
-
Object
- Object
- Policial::StyleGuides::Base
- Defined in:
- lib/policial/style_guides/base.rb
Overview
Public: Base to contain common style guide logic.
Direct Known Subclasses
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(repo_config) ⇒ Base
constructor
A new instance of Base.
- #violations_in_file(_file) ⇒ Object
Constructor Details
#initialize(repo_config) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/policial/style_guides/base.rb', line 5 def initialize(repo_config) @repo_config = repo_config end |
Instance Method Details
#enabled? ⇒ Boolean
9 10 11 |
# File 'lib/policial/style_guides/base.rb', line 9 def enabled? @repo_config.enabled_for?(self.class) end |
#violations_in_file(_file) ⇒ Object
13 14 15 |
# File 'lib/policial/style_guides/base.rb', line 13 def violations_in_file(_file) fail NotImplementedError, "must implement ##{__method__}" end |